Remove alloc gate from Sequence FromStr
What changed, and why it matters
This commit removes an unnecessary feature gate so that parsing a Sequence value from a string works in more build configurations. It is a code-cleanup/feature-availability change, not a security fix.
No security action required; treat as a normal build/feature cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff removes #[cfg(feature = “alloc”)] from the invocation of parse_int::impl_parse_str_from_int_infallible! for Sequence. The macro itself already gates its generated FromStr implementation correctly, so the outer gate only needlessly prevented the impl from being available when the alloc feature was off. There is no change to parsing logic, bounds checking, or consensus behavior.
Changed components
units/src/sequence.rsSequence FromStr implementationInspect captured patch +0 / −1
diff --git a/units/src/sequence.rs b/units/src/sequence.rs
index ba73189d..9fcf9fbd 100644
--- a/units/src/sequence.rs
+++ b/units/src/sequence.rs
@@ -255,7 +255,6 @@ impl fmt::Debug for Sequence {
}
}
-#[cfg(feature = "alloc")]
parse_int::impl_parse_str_from_int_infallible!(Sequence, u32, from_consensus);
#[cfg(feature = "encoding")]
Why this scored 16/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.