From 4c4cd681cae40d46566a54d359b18dfd72ebc2f7 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 30 Jun 2026 12:14:24 -0400 Subject: [PATCH 1/2] Add edition 2024 lints to show edition 2024 preparedness Signed-off-by: mulhern --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 2e311b6..b373ddc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -39,6 +39,7 @@ future_incompatible = { level = "deny", priority = 1 } unused = { level = "deny", priority = 2} rust_2018_idioms = { level = "deny", priority = 3 } nonstandard_style = { level = "deny", priority = 4 } +rust-2024-compatibility = { level = "allow", priority = 5 } [lints.clippy] all = { level = "deny" } From 0854ffcd68352604e681d066f5e043404e77aed1 Mon Sep 17 00:00:00 2001 From: mulhern Date: Tue, 30 Jun 2026 12:16:23 -0400 Subject: [PATCH 2/2] Increase edition to 2024 Also reformat in a few places, since the new edition requires it. Signed-off-by: mulhern --- Cargo.toml | 2 +- src/lib.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b373ddc..a5d49d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/stratis-storage/loopdev-3" readme = "README.md" categories = ["os::linux-apis", "api-bindings"] keywords = ["loop"] -edition = "2021" +edition = "2024" exclude = ["/.github", ".gitignore", "Makefile"] [lib] diff --git a/src/lib.rs b/src/lib.rs index adb4c28..5a96772 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,8 +38,8 @@ //! ld.detach().unwrap(); //! ``` use crate::bindings::{ - loop_info64, LOOP_CLR_FD, LOOP_CTL_ADD, LOOP_CTL_GET_FREE, LOOP_SET_CAPACITY, LOOP_SET_FD, - LOOP_SET_STATUS64, LO_FLAGS_AUTOCLEAR, LO_FLAGS_PARTSCAN, LO_FLAGS_READ_ONLY, + LO_FLAGS_AUTOCLEAR, LO_FLAGS_PARTSCAN, LO_FLAGS_READ_ONLY, LOOP_CLR_FD, LOOP_CTL_ADD, + LOOP_CTL_GET_FREE, LOOP_SET_CAPACITY, LOOP_SET_FD, LOOP_SET_STATUS64, loop_info64, }; #[cfg(feature = "direct_io")] use bindings::LOOP_SET_DIRECT_IO;