From 42ff7bcb6f5ead19fe216132737d2a84aa916a49 Mon Sep 17 00:00:00 2001 From: Louis Thiery Date: Tue, 7 Jul 2026 18:35:29 +0000 Subject: [PATCH] Migrate workspace to Rust 2024 edition - edition 2021 -> 2024 in all three crates; bytescale rust-version 1.65 -> 1.85 (edition 2024 minimum) - import reordering per the 2024 style edition (rustfmt) - no code changes required; cargo fix --edition suggested expr_2021 macro fragments in test macros, kept plain expr since they only match ordinary expressions --- bytescale/Cargo.toml | 4 ++-- bytescale/src/lib.rs | 2 +- humanbyte-derive/Cargo.toml | 2 +- humanbyte-derive/src/lib.rs | 2 +- humanbyte/Cargo.toml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bytescale/Cargo.toml b/bytescale/Cargo.toml index 0197ae45..ce0cb076 100644 --- a/bytescale/Cargo.toml +++ b/bytescale/Cargo.toml @@ -7,8 +7,8 @@ keywords = ["byte", "utility", "human-readable", "format"] categories = ["development-tools", "filesystem"] repository = "https://github.com/lthiery/humanbyte" license = "Apache-2.0" -edition = "2021" -rust-version = "1.65" +edition = "2024" +rust-version = "1.85" [features] default = ["std", "derive"] diff --git a/bytescale/src/lib.rs b/bytescale/src/lib.rs index 71d0b0f2..6e6b93bd 100644 --- a/bytescale/src/lib.rs +++ b/bytescale/src/lib.rs @@ -20,7 +20,7 @@ pub use self::ByteScale as _doc_ByteScale; #[cfg(test)] mod tests { use super::*; - use humanbyte::{Format, B, KB, MB}; + use humanbyte::{B, Format, KB, MB}; #[test] fn test_arithmetic_op() { diff --git a/humanbyte-derive/Cargo.toml b/humanbyte-derive/Cargo.toml index 8384608f..d769c53d 100644 --- a/humanbyte-derive/Cargo.toml +++ b/humanbyte-derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "humanbyte-derive" version = "0.2.1-alpha.0" -edition = "2021" +edition = "2024" authors = ["Louis Thiery "] description = "A procedural macro for deriving human readable byte functions" keywords = ["byte-size", "utility", "human-readable", "no_std"] diff --git a/humanbyte-derive/src/lib.rs b/humanbyte-derive/src/lib.rs index 7284d97c..22786ba2 100644 --- a/humanbyte-derive/src/lib.rs +++ b/humanbyte-derive/src/lib.rs @@ -1,7 +1,7 @@ use proc_macro::TokenStream; use proc_macro2::Span; use quote::quote; -use syn::{parse_macro_input, DeriveInput}; +use syn::{DeriveInput, parse_macro_input}; #[proc_macro_derive(HumanByte)] pub fn humanbyte(input: TokenStream) -> TokenStream { diff --git a/humanbyte/Cargo.toml b/humanbyte/Cargo.toml index b2e44f9d..40f39d9d 100644 --- a/humanbyte/Cargo.toml +++ b/humanbyte/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "humanbyte" version = "0.2.1-alpha.0" -edition = "2021" +edition = "2024" authors = ["Louis Thiery "] description = "A procedural macro for deriving human readable byte functions" keywords = ["byte-size", "utility", "human-readable", "no_std"]