base58: Split cfg(all(...)) into stacked attributes
What changed, and why it matters
This commit is a minor code-style change in the Rust Bitcoin library. It rewrites a single conditional compilation attribute from one combined form into two stacked forms. There is no functional change, no bug fix, and no security relevance.
No action needed. This is a non-functional style/refactoring commit with no security implications.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff changes #[cfg(all(feature = "alloc", not(feature = "std")))] into two separate attributes: #[cfg(feature = "alloc")] and #[cfg(not(feature = "std"))]. In Rust, stacked #[cfg] attributes are logically equivalent to cfg(all(...)). The change only affects how the compiler checks feature flags and has no effect on which code is compiled or how it behaves.
Changed components
base58/src/lib.rsInspect captured patch +2 / −1
diff --git a/base58/src/lib.rs b/base58/src/lib.rs
index abbd03e4..d7ed6a00 100644
--- a/base58/src/lib.rs
+++ b/base58/src/lib.rs
@@ -32,7 +32,8 @@ static BASE58_CHARS: &[u8] = b"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopq
#[cfg(feature = "alloc")]
pub mod error;
-#[cfg(all(feature = "alloc", not(feature = "std")))]
+#[cfg(feature = "alloc")]
+#[cfg(not(feature = "std"))]
pub use alloc::{string::String, vec::Vec};
#[cfg(feature = "alloc")]
use core::fmt;
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.