What changed, and why it matters
This commit is purely a code-formatting cleanup. It only changes whitespace, line breaks, and import order to match the project's style rules. No program logic, behavior, or security properties were changed.
No security action needed. Treat as normal maintenance/style cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff shows rustfmt-style changes: collapsing multi-line function bodies to single-line braces, rewrapping a long if let expression across multiple lines, removing unnecessary braces around a pub use list, and reordering use statements alphabetically. There are no semantic changes, no new code paths, and no changes to cryptographic or consensus-critical logic.
Changed components
consensus_encoding/src/encode/encoders.rsconsensus_encoding/src/encode/mod.rscrypto/src/lib.rstaproot-primitives/src/lib.rsInspect captured patch +8 / −14
diff --git a/consensus_encoding/src/encode/encoders.rs b/consensus_encoding/src/encode/encoders.rs
index 03db6012..5c124615 100644
--- a/consensus_encoding/src/encode/encoders.rs
+++ b/consensus_encoding/src/encode/encoders.rs
@@ -28,9 +28,7 @@ impl<'sl> BytesEncoder<'sl> {
impl Encoder for BytesEncoder<'_> {
fn current_chunk(&self) -> &[u8] { self.sl }
- fn advance(&mut self) -> bool {
- false
- }
+ fn advance(&mut self) -> bool { false }
}
impl<'sl> ExactSizeEncoder for BytesEncoder<'sl> {
@@ -54,9 +52,7 @@ impl<const N: usize> Encoder for ArrayEncoder<N> {
fn current_chunk(&self) -> &[u8] { &self.arr }
#[inline]
- fn advance(&mut self) -> bool {
- false
- }
+ fn advance(&mut self) -> bool { false }
}
impl<const N: usize> ExactSizeEncoder for ArrayEncoder<N> {
@@ -83,9 +79,7 @@ impl<const N: usize> Encoder for ArrayRefEncoder<'_, N> {
fn current_chunk(&self) -> &[u8] { self.arr }
#[inline]
- fn advance(&mut self) -> bool {
- false
- }
+ fn advance(&mut self) -> bool { false }
}
impl<const N: usize> ExactSizeEncoder for ArrayRefEncoder<'_, N> {
diff --git a/consensus_encoding/src/encode/mod.rs b/consensus_encoding/src/encode/mod.rs
index f80ea15b..dfd55a57 100644
--- a/consensus_encoding/src/encode/mod.rs
+++ b/consensus_encoding/src/encode/mod.rs
@@ -233,7 +233,9 @@ impl<T: Encoder> Iterator for EncoderByteIter<T> {
fn nth(&mut self, mut n: usize) -> Option<Self::Item> {
// This could be in a loop but we intentionally unroll one iteration so that addition is
// only required at the beginning.
- if let Some(b) = self.position.checked_add(n).and_then(|pos| self.enc.current_chunk().get(pos)) {
+ if let Some(b) =
+ self.position.checked_add(n).and_then(|pos| self.enc.current_chunk().get(pos))
+ {
// length of slice is guaranteed to be at most `isize::MAX` thus is `n` so this cannot
// overflow.
self.position += n + 1;
diff --git a/crypto/src/lib.rs b/crypto/src/lib.rs
index e108ef3e..d82491db 100644
--- a/crypto/src/lib.rs
+++ b/crypto/src/lib.rs
@@ -34,9 +34,7 @@ pub mod sighash;
#[doc(inline)]
#[cfg(feature = "alloc")]
-pub use self::{
- key::{FullPublicKey, Keypair, PrivateKey, LegacyPublicKey, XOnlyPublicKey},
-};
+pub use self::key::{FullPublicKey, Keypair, LegacyPublicKey, PrivateKey, XOnlyPublicKey};
#[cfg(feature = "alloc")]
include!("../include/newtype.rs"); // Explained in `REPO_DIR/docs/README.md`.
diff --git a/taproot-primitives/src/lib.rs b/taproot-primitives/src/lib.rs
index 1dc5a05d..c9176853 100644
--- a/taproot-primitives/src/lib.rs
+++ b/taproot-primitives/src/lib.rs
@@ -29,9 +29,9 @@ use core::fmt;
use arbitrary::{Arbitrary, Unstructured};
#[cfg(feature = "alloc")]
use crypto::key::UntweakedPublicKey;
-use hashes::{hash_newtype, sha256t, sha256t_tag};
#[cfg(feature = "alloc")]
use hashes::HashEngine;
+use hashes::{hash_newtype, sha256t, sha256t_tag};
use secp256k1::Scalar;
/// Maximum depth of a Taproot tree script spend path.
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.