From 19f70959e1b4ff5997010df662a268f2c47ba190 Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Wed, 3 Apr 2024 11:12:45 +1100 Subject: [PATCH] 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.) --- bitcoin/src/pow.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/bitcoin/src/pow.rs b/bitcoin/src/pow.rs index 027b3105..50c30ab6 100644 --- a/bitcoin/src/pow.rs +++ b/bitcoin/src/pow.rs @@ -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 { let (high, low) = if s.len() < 32 { let low = parse::hex_u128(s)?;