diff --git a/crates/client/src/serialize/txt/rdata_parsers/caa.rs b/crates/client/src/serialize/txt/rdata_parsers/caa.rs index a3c976dcce..20fb72be68 100644 --- a/crates/client/src/serialize/txt/rdata_parsers/caa.rs +++ b/crates/client/src/serialize/txt/rdata_parsers/caa.rs @@ -58,7 +58,7 @@ pub(crate) fn parse<'i, I: Iterator>(mut tokens: I) -> ParseResu // parse the flags let issuer_critical = { - let flags = u8::from_str_radix(flags_str, 10)?; + let flags = flags_str.parse::()?; if flags & 0b0111_1111 != 0 { warn!("unexpected flag values in caa (0 or 128): {}", flags); } diff --git a/crates/client/src/serialize/txt/rdata_parsers/tlsa.rs b/crates/client/src/serialize/txt/rdata_parsers/tlsa.rs index 0655459c0b..689e301a41 100644 --- a/crates/client/src/serialize/txt/rdata_parsers/tlsa.rs +++ b/crates/client/src/serialize/txt/rdata_parsers/tlsa.rs @@ -13,7 +13,7 @@ use crate::rr::rdata::tlsa::CertUsage; use crate::rr::rdata::{sshfp, TLSA}; fn to_u8(data: &str) -> ParseResult { - u8::from_str_radix(data, 10).map_err(ParseError::from) + data.parse::().map_err(ParseError::from) } /// Parse the RData from a set of Tokens