Document private from_hex_internal function

Use a code comment to document the calling restrictions of private
function `from_hex_internal`. (Code comment because comment is not well
formed as per convention in this codebase.)
This commit is contained in:
Tobin C. Harding 2024-04-03 11:12:45 +11:00
parent 81a704302c
commit 19f70959e1
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 1 additions and 0 deletions

View File

@ -420,6 +420,7 @@ impl U256 {
Ok(U256::from_hex_internal(s)?)
}
// Caller to ensure `s` does not contain a prefix.
fn from_hex_internal(s: &str) -> Result<Self, ParseIntError> {
let (high, low) = if s.len() < 32 {
let low = parse::hex_u128(s)?;