What changed, and why it matters
This commit is an automated code-formatting run by the rustfmt tool. It only adjusts whitespace and line breaks in four source files, making no changes to program logic, algorithms, or data handling. There is no security relevance.
No action needed; this is a routine formatting commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows pure formatting changes produced by rustfmt nightly: collapsing/expanding brace bodies for Default impls and removing a trailing blank line. No functional code, constants, control flow, or cryptographic operations were modified.
Changed components
Inspect captured patch +5 / −8
diff --git a/consensus_encoding/src/decode/decoders.rs b/consensus_encoding/src/decode/decoders.rs
index 372e69cb..4470ad59 100644
--- a/consensus_encoding/src/decode/decoders.rs
+++ b/consensus_encoding/src/decode/decoders.rs
@@ -383,9 +383,7 @@ enum Decoder2State<A: Decoder, B: Decoder> {
// the `#[default]` attribute may only be used on unit enum variants
impl<A: Decoder + Default, B: Decoder + Default> Default for Decoder2State<A, B> {
- fn default() -> Self {
- Self::First(A::default(), B::default())
- }
+ fn default() -> Self { Self::First(A::default(), B::default()) }
}
impl<A, B> Decoder2<A, B>
diff --git a/consensus_encoding/src/decode/mod.rs b/consensus_encoding/src/decode/mod.rs
index 0d1ffeb7..61215220 100644
--- a/consensus_encoding/src/decode/mod.rs
+++ b/consensus_encoding/src/decode/mod.rs
@@ -46,9 +46,7 @@ pub trait Decode {
type Decoder: Decoder<Output = Self> + Default;
/// Constructs a "default decoder" for the type.
- fn decoder() -> Self::Decoder {
- Self::Decoder::default()
- }
+ fn decoder() -> Self::Decoder { Self::Decoder::default() }
}
/// A push decoder for a consensus-decodable object.
diff --git a/hashes/src/sha256/crypto/mod.rs b/hashes/src/sha256/crypto/mod.rs
index 3cafc24f..20701b63 100644
--- a/hashes/src/sha256/crypto/mod.rs
+++ b/hashes/src/sha256/crypto/mod.rs
@@ -845,4 +845,3 @@ impl HashEngine {
out_chunks[7] = h.wrapping_add(0x5be0cd19).to_be_bytes();
}
}
-
diff --git a/p2p/src/message.rs b/p2p/src/message.rs
index df35368a..53431339 100644
--- a/p2p/src/message.rs
+++ b/p2p/src/message.rs
@@ -1390,7 +1390,9 @@ enum DecoderState {
}
impl Default for DecoderState {
- fn default() -> Self { Self::ReadingHeader { header_decoder: V1MessageHeaderDecoder::default() } }
+ fn default() -> Self {
+ Self::ReadingHeader { header_decoder: V1MessageHeaderDecoder::default() }
+ }
}
/// Decoder for [`V1NetworkMessage`].
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.