Skip to content

Commit a4cd05f

Browse files
committed
build(deps): update the rust version for adopt edition 2024
1 parent ef759bd commit a4cd05f

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ edition = "2021"
2525

2626
# Common dependencies for all crates
2727
[workspace.dependencies]
28-
async-trait = "0.1.52"
28+
async-trait = "0.1.89"
2929
cgroups-rs = "0.4.0"
3030
crossbeam = "0.8.1"
3131
futures = "0.3.19"

crates/runc-shim/src/task.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ where
474474
async fn shutdown(&self, _ctx: &TtrpcContext, _req: ShutdownRequest) -> TtrpcResult<Empty> {
475475
debug!("Shutdown request");
476476
let containers = self.containers.read().await;
477-
if containers.len() > 0 {
477+
if !containers.is_empty() {
478478
return Ok(Empty::new());
479479
}
480480
self.exit.signal();

crates/shim/src/asynchronous/publisher.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use crate::{
3636
/// The publisher reports events and uses a queue to retry the event reporting.
3737
/// The maximum number of attempts to report is 5 times.
3838
/// When the ttrpc client fails to report, it attempts to reconnect to the client and report.
39-
39+
///
4040
/// Max queue size
4141
const QUEUE_SIZE: i64 = 1024;
4242
/// Max try five times

crates/shim/src/mount_linux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -791,12 +791,12 @@ pub fn setup_loop_dev(backing_file: &str, loop_dev: &str, params: &LoopParams) -
791791
}
792792
// 3. set info
793793
let mut info = LoopInfo::default();
794-
let backing_file_truncated = if backing_file.as_bytes().len() > info.file_name.len() {
794+
let backing_file_truncated = if backing_file.len() > info.file_name.len() {
795795
&backing_file[0..info.file_name.len()]
796796
} else {
797797
backing_file
798798
};
799-
info.file_name[..backing_file_truncated.as_bytes().len()]
799+
info.file_name[..backing_file_truncated.len()]
800800
.copy_from_slice(backing_file_truncated.as_bytes());
801801
if params.readonly {
802802
info.flags |= LO_FLAGS_READ_ONLY;

crates/snapshots/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ pub use wrap::server;
3232

3333
/// Generated GRPC apis.
3434
pub mod api {
35-
#[allow(clippy::tabs_in_doc_comments)]
36-
#[allow(rustdoc::invalid_rust_codeblocks)]
35+
#![allow(clippy::tabs_in_doc_comments)]
36+
#![allow(rustdoc::invalid_rust_codeblocks)]
3737

3838
/// Generated snapshots bindings.
3939
pub mod snapshots {

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "1.82"
2+
channel = "1.91"
33
components = ["rustfmt", "clippy", "llvm-tools"]

0 commit comments

Comments
 (0)