From 6c672f2ea19a63b3ab352ed51fe6f10d5a4aa26c Mon Sep 17 00:00:00 2001 From: Trinity Pointard Date: Thu, 6 May 2021 23:05:06 +0200 Subject: [PATCH] fix clippy I'm not sure what caused this to fail. Changes in clippy? --- crates/client/src/serialize/txt/rdata_parsers/caa.rs | 2 +- crates/client/src/serialize/txt/rdata_parsers/tlsa.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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