What changed, and why it matters
This commit is a routine automated code-formatting run by the rustfmt tool. It only changes whitespace, import order, and brace style in five files. There are no functional code changes, no bug fixes, and no security-related alterations.
No security action needed. Treat as normal repository hygiene.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff consists entirely of rustfmt-generated style changes: reordering a re-export block in bitcoin/src/lib.rs, collapsing one-line functions in crypto/src/taproot.rs and p2p/src/lib.rs, removing trailing whitespace in hashes/src/sha256/crypto/arm_sha2.rs, and reordering/reformatting imports and an error-construction expression in key_expression/src/bip32.rs. No logic, API, or cryptographic behavior is modified.
Changed components
bitcoin/src/lib.rscrypto/src/taproot.rshashes/src/sha256/crypto/arm_sha2.rskey_expression/src/bip32.rsp2p/src/lib.rsInspect captured patch +14 / −17
diff --git a/bitcoin/src/lib.rs b/bitcoin/src/lib.rs
index a743dfbd..6e640963 100644
--- a/bitcoin/src/lib.rs
+++ b/bitcoin/src/lib.rs
@@ -177,6 +177,10 @@ pub type CompressedPublicKey = FullPublicKey;
#[doc(hidden)]
pub type PublicKey = LegacyPublicKey;
+// Re-export modules directly from lower level crates
+#[doc(inline)]
+pub use key_expression::bip32;
+
#[doc(inline)]
pub use crate::{
address::{Address, AddressType, KnownHrp},
@@ -204,10 +208,6 @@ pub use crate::{
blockdata::{block, constants, fee_rate, locktime, script, transaction, weight, witness},
};
-// Re-export modules directly from lower level crates
-#[doc(inline)]
-pub use key_expression::bip32;
-
#[rustfmt::skip]
#[allow(unused_imports)]
mod prelude {
diff --git a/crypto/src/taproot.rs b/crypto/src/taproot.rs
index d02474d3..4c221061 100644
--- a/crypto/src/taproot.rs
+++ b/crypto/src/taproot.rs
@@ -161,9 +161,7 @@ impl SerializedSignature {
#[inline]
pub fn iter(&self) -> core::slice::Iter<'_, u8> { self.into_iter() }
- fn is_default(&self) -> bool {
- self.len() != MAX_LEN
- }
+ fn is_default(&self) -> bool { self.len() != MAX_LEN }
#[inline]
fn fmt_internal(&self, f: &mut fmt::Formatter, case: hex_unstable::Case) -> fmt::Result {
@@ -195,9 +193,7 @@ impl fmt::Debug for SerializedSignature {
}
impl fmt::Display for SerializedSignature {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::LowerHex::fmt(self, f)
- }
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::LowerHex::fmt(self, f) }
}
impl fmt::LowerHex for SerializedSignature {
diff --git a/hashes/src/sha256/crypto/arm_sha2.rs b/hashes/src/sha256/crypto/arm_sha2.rs
index be57d1b6..eb49331c 100644
--- a/hashes/src/sha256/crypto/arm_sha2.rs
+++ b/hashes/src/sha256/crypto/arm_sha2.rs
@@ -199,7 +199,7 @@ pub(super) unsafe fn process_blocks(state: &mut [u32; 8], blocks: &[u8]) {
block_offset += 64;
}
-
+
// Save state
vst1q_u32(state.as_mut_ptr().add(0), state0);
vst1q_u32(state.as_mut_ptr().add(4), state1);
diff --git a/key_expression/src/bip32.rs b/key_expression/src/bip32.rs
index a13fb7df..38501840 100644
--- a/key_expression/src/bip32.rs
+++ b/key_expression/src/bip32.rs
@@ -6,8 +6,8 @@
//! at <https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki>.
use alloc::string::String;
-use alloc::vec::Vec;
use alloc::vec;
+use alloc::vec::Vec;
use core::ops::Index;
use core::str::FromStr;
use core::{fmt, slice};
@@ -1284,7 +1284,8 @@ impl<'a> Arbitrary<'a> for Xpriv {
#[cfg(test)]
mod tests {
- use alloc::{string::ToString, format};
+ use alloc::format;
+ use alloc::string::ToString;
use hex_unstable::hex;
#[cfg(feature = "serde")]
@@ -1364,7 +1365,9 @@ mod tests {
let invalid_path = "2147483648";
assert_eq!(
invalid_path.parse::<DerivationPath>(),
- Err(ParseChildNumberError::IndexOutOfRange(IndexOutOfRangeError { index: 2_147_483_648 })),
+ Err(ParseChildNumberError::IndexOutOfRange(IndexOutOfRangeError {
+ index: 2_147_483_648
+ })),
);
}
diff --git a/p2p/src/lib.rs b/p2p/src/lib.rs
index 90d7e193..c3c94be1 100644
--- a/p2p/src/lib.rs
+++ b/p2p/src/lib.rs
@@ -422,9 +422,7 @@ impl TryFrom<Magic> for Network {
}
impl fmt::Display for Magic {
- fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
- fmt::LowerHex::fmt(self, f)
- }
+ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::LowerHex::fmt(self, f) }
}
impl fmt::Debug for Magic {
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.