diff --git a/AGENTS.md b/AGENTS.md index 3a5fbed..fab2b89 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -49,7 +49,7 @@ Run `make help` to see all available targets. ## Conventions - **`no_std`**: Both crates. Do not add `std` dependencies. -- **Edition 2024**: MSRV 1.85. +- **Edition 2024**: The workspace uses Rust edition 2024 with MSRV 1.96.1. - **Wide downstream impact**: This crate is a dependency of most Dusk repos. Check `Cargo.lock` in downstream repos before releasing. See the Change Propagation table below. ## Change Propagation diff --git a/derive-hex/CHANGELOG.md b/derive-hex/CHANGELOG.md index 4dd8975..8c05d45 100644 --- a/derive-hex/CHANGELOG.md +++ b/derive-hex/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Raise the MSRV to Rust 1.96.1 [#51] + ### Security - Forbid unsafe code in `derive-hex` [#45] @@ -37,6 +41,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [#10]: https://github.com/dusk-network/dusk-bytes/issues/10 [#45]: https://github.com/dusk-network/dusk-bytes/issues/45 +[#51]: https://github.com/dusk-network/dusk-bytes/issues/51 [unreleased]: https://github.com/dusk-network/dusk-bytes/compare/derive-hex-0.1.2...HEAD [0.1.2]: https://github.com/dusk-network/dusk-bytes/releases/tag/derive-hex-0.1.2 [0.1.1]: https://github.com/dusk-network/dusk-bytes/releases/tag/derive-hex-0.1.1 diff --git a/derive-hex/Cargo.toml b/derive-hex/Cargo.toml index a0a8c3e..e2b67e1 100644 --- a/derive-hex/Cargo.toml +++ b/derive-hex/Cargo.toml @@ -3,7 +3,7 @@ name = "derive-hex" version = "0.1.3-rc.0" authors = ["zer0 "] edition = "2024" -rust-version = "1.85" +rust-version = "1.96.1" readme = "README.md" diff --git a/dusk-bytes/Cargo.toml b/dusk-bytes/Cargo.toml index a268db8..7aeaa23 100644 --- a/dusk-bytes/Cargo.toml +++ b/dusk-bytes/Cargo.toml @@ -3,7 +3,7 @@ name = "dusk-bytes" version = "0.1.8-rc.0" authors = ["zer0 "] edition = "2024" -rust-version = "1.85" +rust-version = "1.96.1" readme = "README.md" diff --git a/dusk-bytes/src/parse.rs b/dusk-bytes/src/parse.rs index f5f9ace..1d2571b 100644 --- a/dusk-bytes/src/parse.rs +++ b/dusk-bytes/src/parse.rs @@ -65,7 +65,7 @@ pub trait ParseHexStr: Serializable { /// const ODD: [u8; 1] = hex::<3, 1>(b"abc"); /// ``` pub const fn hex(bytes: &[u8; N]) -> [u8; M] { - if N % 2 != 0 { + if !N.is_multiple_of(2) { panic!("hex(): input length must be even"); }