What changed, and why it matters
This commit only adds Clippy lint-suppression attributes (`#[allow(clippy::too_many_arguments)]`) to three internal cryptographic helper functions in the `rust-bitcoin` hashes crate. It does not change any executable code, logic, or public API. There is no security relevance: it simply tells the Rust linter to stop warning that these functions have many parameters.
No security action required. This is a code-quality/linting change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff adds #[allow(clippy::too_many_arguments)] annotations to round and later_round functions in hashes/src/ripemd160/crypto.rs, hashes/src/sha256/crypto.rs, and hashes/src/sha512/crypto.rs. These functions are pub(super) inside private small_hash modules and implement SHA-256/SHA-512/RIPEMD-160 round logic. The annotations suppress Clippy’s too_many_arguments lint. No code behavior, signatures, or safety properties are altered.
Changed components
hashes/src/ripemd160/crypto.rshashes/src/sha256/crypto.rshashes/src/sha512/crypto.rsInspect captured patch +5 / −0
diff --git a/hashes/src/ripemd160/crypto.rs b/hashes/src/ripemd160/crypto.rs
index 115974f2..189e52c3 100644
--- a/hashes/src/ripemd160/crypto.rs
+++ b/hashes/src/ripemd160/crypto.rs
@@ -8,6 +8,7 @@ use super::{HashEngine, BLOCK_SIZE};
#[macro_use]
mod small_hash {
#[rustfmt::skip]
+ #[allow(clippy::too_many_arguments)]
pub(super) fn round(a: u32, _b: u32, c: u32, _d: u32, e: u32,
x: u32, bits: u32, add: u32, round: u32,
) -> (u32, u32) {
diff --git a/hashes/src/sha256/crypto.rs b/hashes/src/sha256/crypto.rs
index 905a5848..26f144a8 100644
--- a/hashes/src/sha256/crypto.rs
+++ b/hashes/src/sha256/crypto.rs
@@ -26,6 +26,7 @@ mod small_hash {
use super::*;
#[rustfmt::skip]
+ #[allow(clippy::too_many_arguments)]
pub(super) const fn round(a: u32, b: u32, c: u32, d: u32, e: u32,
f: u32, g: u32, h: u32, k: u32, w: u32) -> (u32, u32) {
let t1 =
@@ -34,6 +35,7 @@ mod small_hash {
(d.wrapping_add(t1), t1.wrapping_add(t2))
}
#[rustfmt::skip]
+ #[allow(clippy::too_many_arguments)]
pub(super) const fn later_round(a: u32, b: u32, c: u32, d: u32, e: u32,
f: u32, g: u32, h: u32, k: u32, w: u32,
w1: u32, w2: u32, w3: u32,
diff --git a/hashes/src/sha512/crypto.rs b/hashes/src/sha512/crypto.rs
index a86d962e..7fd8def2 100644
--- a/hashes/src/sha512/crypto.rs
+++ b/hashes/src/sha512/crypto.rs
@@ -21,6 +21,7 @@ mod small_hash {
use super::*;
#[rustfmt::skip]
+ #[allow(clippy::too_many_arguments)]
pub(super) fn round(a: u64, b: u64, c: u64, d: &mut u64, e: u64,
f: u64, g: u64, h: &mut u64, k: u64, w: u64,
) {
@@ -31,6 +32,7 @@ mod small_hash {
*h = t1.wrapping_add(t2);
}
#[rustfmt::skip]
+ #[allow(clippy::too_many_arguments)]
pub(super) fn later_round(a: u64, b: u64, c: u64, d: &mut u64, e: u64,
f: u64, g: u64, h: &mut u64, k: u64, w: u64,
w1: u64, w2: u64, w3: u64,
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.