What changed, and why it matters
This commit adds a single missing semicolon in a Rust formatting function. It is a cosmetic/style fix to silence a Clippy lint and does not change program behavior or fix any security issue.
No security action needed. Treat as a routine code-quality cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
In primitives/src/hash_types/generic.rs, the fmt::Debug::fmt implementation for HashType changed write!(f, "{:02x}", byte)? to write!(f, "{:02x}", byte)?;. The trailing question mark already propagates any error; adding a semicolon merely satisfies the semi_colon_if_nothing_returned Clippy lint. The compiled behavior is identical.
Changed components
primitives/src/hash_types/generic.rsInspect captured patch +1 / −1
diff --git a/primitives/src/hash_types/generic.rs b/primitives/src/hash_types/generic.rs
index 6324fd01..e017681b 100644
--- a/primitives/src/hash_types/generic.rs
+++ b/primitives/src/hash_types/generic.rs
@@ -54,7 +54,7 @@ impl str::FromStr for HashType {
impl fmt::Debug for HashType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
for byte in self.as_byte_array() {
- write!(f, "{:02x}", byte)?
+ write!(f, "{:02x}", byte)?;
}
Ok(())
}
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.