Merge rust-bitcoin/rust-bitcoin#6802: Automated nightly rustfmt (2026-08-30)
What changed, and why it matters
This is an automated code-formatting commit. It only changes whitespace and line breaks in two source files to match the latest nightly rustfmt style. No program logic, behavior, or security properties were changed.
No action needed; this is a cosmetic formatting change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit applies rustfmt formatting: it rewraps a function signature and a method call chain in bitcoin/src/crypto/sighash.rs, and removes trailing whitespace from a doc comment in crypto/src/ecdsa.rs. There are no functional code changes, no cryptographic changes, and no API changes.
Changed components
bitcoin/src/crypto/sighash.rscrypto/src/ecdsa.rsInspect captured patch +13 / −3
### bitcoin/src/crypto/sighash.rs
@@ -947,7 +947,11 @@ impl<'a> Annex<'a> {
pub fn as_bytes(&self) -> &[u8] { self.0 }
}
-fn is_invalid_use_of_sighash_single(sighash: EcdsaSighashType, input_index: usize, outputs_len: usize) -> bool {
+fn is_invalid_use_of_sighash_single(
+ sighash: EcdsaSighashType,
+ input_index: usize,
+ outputs_len: usize,
+) -> bool {
sighash.is_single() && input_index >= outputs_len
}
@@ -1413,7 +1417,13 @@ mod tests {
let want = LegacySighash::from_byte_array(bytes);
let cache = SighashCache::new(&tx);
- let got = cache.legacy_signature_hash(input_index, &script, EcdsaSighashType::from_consensus(hash_type as u32)).unwrap();
+ let got = cache
+ .legacy_signature_hash(
+ input_index,
+ &script,
+ EcdsaSighashType::from_consensus(hash_type as u32),
+ )
+ .unwrap();
assert_eq!(got, want);
}
### crypto/src/ecdsa.rs
@@ -61,7 +61,7 @@ impl Signature {
/// Non-standard sighash types are accepted here since they're consensus valid, so we use
/// [`EcdsaSighashType::from_consensus`] here instead of [`EcdsaSighashType::from_standard`]
/// to deserialize the sighash type.
- ///
+ ///
/// # Errors
///
/// * [`DecodeError::EmptySignature`] if the slice is empty.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.