diff --git a/units/src/parse.rs b/units/src/parse.rs index 9ace652f..ff5e64bd 100644 --- a/units/src/parse.rs +++ b/units/src/parse.rs @@ -92,7 +92,8 @@ pub fn int + Into>(s: S) -> Result + Into>(s: S) -> Result { - u32::from_str_radix(strip_hex_prefix(s.as_ref()), 16).map_err(|error| ParseIntError { + let stripped = strip_hex_prefix(s.as_ref()); + u32::from_str_radix(stripped, 16).map_err(|error| ParseIntError { input: s.into(), bits: 32, is_signed: false,