Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ edition = "2021"

# Common dependencies for all crates
[workspace.dependencies]
async-trait = "0.1.52"
async-trait = "0.1.89"
Copy link

Copilot AI Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR title mentions "adopt edition 2024", but the edition in Cargo.toml remains set to "2021" at line 24. To adopt edition 2024, this should be changed to "2024". Note that edition 2024 requires Rust 1.85 or later when it becomes available.

Copilot uses AI. Check for mistakes.
cgroups-rs = "0.4.0"
crossbeam = "0.8.1"
futures = "0.3.19"
Expand Down
2 changes: 1 addition & 1 deletion crates/runc-shim/src/processes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub trait Process {
async fn resume(&mut self) -> Result<()>;
async fn id(&self) -> &str;
}

#[allow(dead_code)]
#[async_trait]
pub trait ProcessLifecycle<P: Process> {
async fn start(&self, p: &mut P) -> Result<()>;
Expand Down
2 changes: 1 addition & 1 deletion crates/runc-shim/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ where
async fn shutdown(&self, _ctx: &TtrpcContext, _req: ShutdownRequest) -> TtrpcResult<Empty> {
debug!("Shutdown request");
let containers = self.containers.read().await;
if containers.len() > 0 {
if !containers.is_empty() {
return Ok(Empty::new());
}
self.exit.signal();
Expand Down
2 changes: 1 addition & 1 deletion crates/shim/src/asynchronous/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use crate::{
/// The publisher reports events and uses a queue to retry the event reporting.
/// The maximum number of attempts to report is 5 times.
/// When the ttrpc client fails to report, it attempts to reconnect to the client and report.

///
/// Max queue size
const QUEUE_SIZE: i64 = 1024;
/// Max try five times
Expand Down
4 changes: 2 additions & 2 deletions crates/shim/src/mount_linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -791,12 +791,12 @@ pub fn setup_loop_dev(backing_file: &str, loop_dev: &str, params: &LoopParams) -
}
// 3. set info
let mut info = LoopInfo::default();
let backing_file_truncated = if backing_file.as_bytes().len() > info.file_name.len() {
let backing_file_truncated = if backing_file.len() > info.file_name.len() {
&backing_file[0..info.file_name.len()]
} else {
backing_file
};
info.file_name[..backing_file_truncated.as_bytes().len()]
info.file_name[..backing_file_truncated.len()]
.copy_from_slice(backing_file_truncated.as_bytes());
if params.readonly {
info.flags |= LO_FLAGS_READ_ONLY;
Expand Down
4 changes: 2 additions & 2 deletions crates/snapshots/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub use wrap::server;

/// Generated GRPC apis.
pub mod api {
#[allow(clippy::tabs_in_doc_comments)]
#[allow(rustdoc::invalid_rust_codeblocks)]
#![allow(clippy::tabs_in_doc_comments)]
#![allow(rustdoc::invalid_rust_codeblocks)]

/// Generated snapshots bindings.
pub mod snapshots {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.82"
channel = "1.91"
components = ["rustfmt", "clippy", "llvm-tools"]
Loading