Skip to content

Commit

Permalink
Update rustc version
Browse files Browse the repository at this point in the history
Because this error
`package `home v0.5.11` cannot be built
because it requires rustc 1.81 or newer,
while the currently active rustc version is 1.77.0`

Signed-off-by: jokemanfire <[email protected]>
  • Loading branch information
jokemanfire committed Dec 26, 2024
1 parent 5b5cbcd commit 2ec475f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel="1.77.0"
channel="1.81.0"
profile="default"
components=["rustfmt", "clippy"]
27 changes: 13 additions & 14 deletions src/asynchronous/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::{Arc, Mutex};

use async_trait::async_trait;
use nix::unistd::close;
use tokio::{self, sync::mpsc, task};

use crate::common::client_connect;
Expand Down Expand Up @@ -161,19 +160,19 @@ impl Client {
))
}
}

struct ClientClose {
fd: RawFd,
close_fd: RawFd,
}

impl Drop for ClientClose {
fn drop(&mut self) {
close(self.close_fd).unwrap();
close(self.fd).unwrap();
trace!("All client is droped");
}
}
// Annotate the code because it has not been used
// struct ClientClose {
// fd: RawFd,
// close_fd: RawFd,
// }

// impl Drop for ClientClose {
// fn drop(&mut self) {
// close(self.close_fd).unwrap();
// close(self.fd).unwrap();
// trace!("All client is droped");
// }
// }

#[derive(Debug)]
struct ClientBuilder {
Expand Down

0 comments on commit 2ec475f

Please sign in to comment.