Skip to content

Commit

Permalink
Update pati version
Browse files Browse the repository at this point in the history
  • Loading branch information
sile committed Sep 24, 2023
1 parent 3b70f45 commit f00afab
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ clap = { version = "4.3.19", features = ["derive"] }
orfail = "1.1.0"
pagurus = { version = "0.7.2", features = ["image", "serde"] }
pagurus_tui = "0.7.2"
pati = { version = "0.1", path = "./pati/" }
pati = { version = "0.2", path = "./pati/" }
serde = { version = "1.0.182", features = ["derive"] }
serde_json = "1.0.104"

Expand Down
6 changes: 4 additions & 2 deletions src/model_agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,24 @@ impl ModelAgentServer {
}

let mut closed = Vec::new();
for (&addr, client) in &mut self.clients {
for (&addr, _client) in &mut self.clients {

Check failure on line 47 in src/model_agent.rs

View workflow job for this annotation

GitHub Actions / Lints (stable)

you seem to want to iterate on a map's keys
closed.push(addr);
}
for addr in closed {
self.clients.remove(&addr);
}
todo!()
}
}

#[derive(Debug)]
pub struct ModelAgentClient {
#[allow(dead_code)]
stream: TcpStream,
}

impl ModelAgentClient {
fn open(port: u16) -> orfail::Result<Self> {
pub fn open(port: u16) -> orfail::Result<Self> {
let stream = TcpStream::connect(("127.0.0.1", port)).or_fail()?;
Ok(Self { stream })
}
Expand Down

0 comments on commit f00afab

Please sign in to comment.