What changed, and why it matters
This commit simply removes unused `cmp` (comparison) imports from five hash algorithm files in the `hashes` crate. It is a cleanup change with no functional effect and no security relevance.
No action required; this is a non-functional cleanup change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit deletes use core::cmp; from ripemd160, sha1, sha256, sha3_256, and sha512 modules. The commit message states cmp::min is no longer used in engine_input_impl. No code logic is changed; this is a pure compiler-warning cleanup.
Changed components
hashes/src/ripemd160/mod.rshashes/src/sha1/mod.rshashes/src/sha256/mod.rshashes/src/sha3_256/mod.rshashes/src/sha512/mod.rsInspect captured patch +2 / −8
diff --git a/hashes/src/ripemd160/mod.rs b/hashes/src/ripemd160/mod.rs
index e130eedb..4dcb23b5 100644
--- a/hashes/src/ripemd160/mod.rs
+++ b/hashes/src/ripemd160/mod.rs
@@ -7,8 +7,6 @@ mod crypto;
#[cfg(test)]
mod tests;
-use core::cmp;
-
use crate::{incomplete_block_len, HashEngine as _};
crate::internal_macros::general_hash_type! {
diff --git a/hashes/src/sha1/mod.rs b/hashes/src/sha1/mod.rs
index c2a8aecc..7267ef5a 100644
--- a/hashes/src/sha1/mod.rs
+++ b/hashes/src/sha1/mod.rs
@@ -7,8 +7,6 @@ mod crypto;
#[cfg(test)]
mod tests;
-use core::cmp;
-
use crate::{incomplete_block_len, HashEngine as _};
crate::internal_macros::general_hash_type! {
diff --git a/hashes/src/sha256/mod.rs b/hashes/src/sha256/mod.rs
index 1fd99694..c80b212d 100644
--- a/hashes/src/sha256/mod.rs
+++ b/hashes/src/sha256/mod.rs
@@ -6,7 +6,7 @@ mod crypto;
#[cfg(test)]
mod tests;
-use core::{cmp, convert, fmt};
+use core::{convert, fmt};
use internals::slice::SliceExt;
diff --git a/hashes/src/sha3_256/mod.rs b/hashes/src/sha3_256/mod.rs
index c16f9688..e5c38a58 100644
--- a/hashes/src/sha3_256/mod.rs
+++ b/hashes/src/sha3_256/mod.rs
@@ -18,7 +18,7 @@
// To read this file, follow the example code: https://keccak.team/keccak_specs_summary.html
// For a detailed specification: https://keccak.team/files/Keccak-reference-3.0.pdf
-use core::{cmp, fmt};
+use core::fmt;
crate::internal_macros::general_hash_type! {
256,
diff --git a/hashes/src/sha512/mod.rs b/hashes/src/sha512/mod.rs
index b5fbc610..fdbc6ee1 100644
--- a/hashes/src/sha512/mod.rs
+++ b/hashes/src/sha512/mod.rs
@@ -8,8 +8,6 @@ mod crypto;
#[cfg(test)]
mod tests;
-use core::cmp;
-
use crate::{incomplete_block_len, HashEngine as _};
crate::internal_macros::general_hash_type! {
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.