Skip to content

Commit

Permalink
landlock: Switch to the 2021 Rust edition
Browse files Browse the repository at this point in the history
Cosmetic changes to format string following Clippy 1.66.0 suggestions:
https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

Signed-off-by: Mickaël Salaün <mic@digikod.net>
  • Loading branch information
l0kod committed Jan 27, 2023
1 parent c5c4c2b commit 1bb1deb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = [
"Mickaël Salaün <mic@digikod.net>",
"Vincent Dagonneau <vincentdagonneau@gmail.com>"
]
edition = "2018"
edition = "2021"
rust-version = "1.63"
description = "Landlock LSM helpers"
homepage = "https://landlock.io"
Expand Down
4 changes: 2 additions & 2 deletions src/compat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,11 @@ lazy_static! {
if ABI::is_known(n) || n == 0 {
ABI::from(n)
} else {
panic!("Unknown ABI: {}", n);
panic!("Unknown ABI: {n}");
}
}
Err(std::env::VarError::NotPresent) => ABI::iter().last().unwrap(),
Err(e) => panic!("Failed to read LANDLOCK_CRATE_TEST_ABI: {}", e),
Err(e) => panic!("Failed to read LANDLOCK_CRATE_TEST_ABI: {e}"),
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ mod tests {
let ret = check(Ruleset::from(abi));

// Useful for failed tests and with cargo test -- --show-output
println!("Checking ABI {:?}, expecting {:#?}", abi, ret);
println!("Checking ABI {abi:?}, expecting {ret:#?}");
if can_emulate(abi, full) {
if abi < partial && error_if_abi_lt_partial {
// TODO: Check exact error type; this may require better error types.
Expand Down

0 comments on commit 1bb1deb

Please sign in to comment.