What changed, and why it matters
This is a tiny build-hygiene patch. A Rust compiler lint (Clippy) was warning that a constant named REVERSE was unused in some build configurations, so the developer added a feature gate so it only exists when the 'hex' feature is enabled. There is no security issue here.
No security action needed. Treat as normal code-quality maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit adds #[cfg(feature = “hex”)] to a private constant REVERSE in primitives/src/hash_types/generic.rs. The constant is only referenced when the hex formatting code is compiled; without the gate, builds with the hex feature disabled produced an unused-constant warning. The change is purely cosmetic/CI hygiene.
Changed components
primitives/src/hash_types/generic.rsInspect captured patch +1 / −0
diff --git a/primitives/src/hash_types/generic.rs b/primitives/src/hash_types/generic.rs
index 7206be69..6324fd01 100644
--- a/primitives/src/hash_types/generic.rs
+++ b/primitives/src/hash_types/generic.rs
@@ -8,6 +8,7 @@
// follow the DRY principle without using macros.
const LEN: usize = <Inner as hashes::Hash>::LEN;
+#[cfg(feature = "hex")]
const REVERSE: bool = <Inner as hashes::Hash>::DISPLAY_BACKWARD;
impl HashType {
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.