mirror of
https://github.com/chatmail/core.git
synced 2026-04-26 01:46:34 +03:00
Fix nightly clippy warnings
This commit is contained in:
@@ -350,7 +350,7 @@ async fn decrypt_setup_file<T: std::io::Read + std::io::Seek>(
|
||||
fn normalize_setup_code(s: &str) -> String {
|
||||
let mut out = String::new();
|
||||
for c in s.chars() {
|
||||
if ('0'..='9').contains(&c) {
|
||||
if c.is_ascii_digit() {
|
||||
out.push(c);
|
||||
if let 4 | 9 | 14 | 19 | 24 | 29 | 34 | 39 = out.len() {
|
||||
out += "-"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
clippy::unused_async
|
||||
)]
|
||||
#![allow(
|
||||
clippy::uninlined_format_args,
|
||||
clippy::match_bool,
|
||||
clippy::mixed_read_write_in_expression,
|
||||
clippy::bool_assert_comparison,
|
||||
|
||||
Reference in New Issue
Block a user