What changed, and why it matters
This commit is a minor code cleanup: it moves a Rust import statement (`use core::fmt;`) from one feature-gated code block to another. The change fixes a compiler lint warning and does not alter any program behavior or security logic.
No security action needed. Treat as routine maintenance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch relocates use core::fmt; from the parent message_signing module (gated behind secp-recovery) into the nested base64_impls module (gated behind both secp-recovery and base64). This is purely a compile-time import hygiene fix. No cryptographic, parsing, or message-signing logic is modified.
Changed components
bitcoin/src/sign_message.rsInspect captured patch +2 / −2
diff --git a/bitcoin/src/sign_message.rs b/bitcoin/src/sign_message.rs
index 5c6d1201..418454f6 100644
--- a/bitcoin/src/sign_message.rs
+++ b/bitcoin/src/sign_message.rs
@@ -26,8 +26,6 @@ pub const BITCOIN_SIGNED_MSG_PREFIX: &[u8] = b"\x18Bitcoin Signed Message:\n";
#[cfg(feature = "secp-recovery")]
mod message_signing {
- use core::fmt;
-
use hashes::sha256d;
use secp256k1::ecdsa::{RecoverableSignature, RecoveryId};
@@ -121,6 +119,8 @@ mod message_signing {
#[cfg(feature = "base64")]
mod base64_impls {
+ use core::fmt;
+
use base64::prelude::{Engine as _, BASE64_STANDARD};
use super::*;
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.