What changed, and why it matters
This commit only fixes compiler lint warnings. It adds missing feature gates so that test code compiles cleanly when certain optional features are enabled or disabled. There is no change to runtime behavior, no bug fix, and no security relevance.
No security action needed. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch in hashes/src/sha256t/mod.rs adds #[cfg(feature = “hex”)] guards to test-only items that depend on the hex feature. This suppresses unused-import and unused-item warnings from Clippy/Rustc when the alloc feature is enabled without hex. It is a pure code-quality cleanup.
Changed components
hashes/src/sha256t/mod.rs (test module only)Inspect captured patch +3 / −0
diff --git a/hashes/src/sha256t/mod.rs b/hashes/src/sha256t/mod.rs
index b7c73aa9..f49f83b8 100644
--- a/hashes/src/sha256t/mod.rs
+++ b/hashes/src/sha256t/mod.rs
@@ -193,6 +193,7 @@ macro_rules! sha256t_tag_constructor {
#[cfg(test)]
mod tests {
#[cfg(feature = "alloc")]
+ #[cfg(feature = "hex")]
use crate::sha256;
use crate::sha256t;
@@ -214,9 +215,11 @@ mod tests {
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default, Hash)]
#[cfg(feature = "alloc")]
+ #[cfg(feature = "hex")]
pub struct TestHashTag;
#[cfg(feature = "alloc")]
+ #[cfg(feature = "hex")]
impl sha256t::Tag for TestHashTag {
const MIDSTATE: sha256::Midstate = sha256::Midstate::new(TEST_MIDSTATE, 64);
}
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.