Fix nightly clippy warnings

This commit is contained in:
link2xt
2022-12-26 00:01:58 +00:00
parent d73c4a92a7
commit 8de7014eeb
3 changed files with 3 additions and 2 deletions

View File

@@ -387,7 +387,7 @@ impl std::str::FromStr for Fingerprint {
let hex_repr: String = input
.to_uppercase()
.chars()
.filter(|&c| ('0'..='9').contains(&c) || ('A'..='F').contains(&c))
.filter(|&c| c.is_ascii_hexdigit())
.collect();
let v: Vec<u8> = hex::decode(&hex_repr)?;
ensure!(v.len() == 20, "wrong fingerprint length: {}", hex_repr);