units: Add mention of wu to hex parsing functions
What changed, and why it matters
This commit only adds two documentation comments to clarify that hex strings passed to certain Weight constructors are interpreted as weight units. There are no code changes, no behavior changes, and no security implications.
No action needed. This is a documentation-only clarification with no security relevance.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies units/src/weight.rs to add doc comments to from_prefixed_hex_str and from_unprefixed_hex_str methods on the Weight type. The comments state that parsed hex values represent weight units. No logic, parsing, validation, or API surface changed.
Changed components
units/src/weight.rs documentationInspect captured patch +4 / −0
diff --git a/units/src/weight.rs b/units/src/weight.rs
index 9e0f8be8..2062e13e 100644
--- a/units/src/weight.rs
+++ b/units/src/weight.rs
@@ -90,6 +90,8 @@ impl Weight {
/// Constructs a new `Weight` from a prefixed hex string.
///
+ /// The hex string once parsed is assumed to represent weight units.
+ ///
/// # Errors
///
/// If the input string is not a valid hex representation of a weight in weight units or it
@@ -102,6 +104,8 @@ impl Weight {
/// Constructs a new `Weight` from an unprefixed hex string.
///
+ /// The hex string once parsed is assumed to represent weight units.
+ ///
/// # Errors
///
/// If the input string is not a valid hex representation of a weight in weight units or if
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.