From 4c516eaa06d984358c48dcc55824f385d3c76af7 Mon Sep 17 00:00:00 2001 From: Alex Saveau Date: Sun, 8 Dec 2024 13:34:45 -0500 Subject: [PATCH] Fix lints --- server/src/io_uring.rs | 2 +- watcher-utils/src/best_target.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/io_uring.rs b/server/src/io_uring.rs index 364f1cf..2dbb56f 100644 --- a/server/src/io_uring.rs +++ b/server/src/io_uring.rs @@ -100,7 +100,7 @@ pub mod types { if Self::DATA_START .checked_add(msghdr_name_len) .and_then(|acc| acc.checked_add(msghdr_control_len)) - .map_or(true, |header_len| buffer.len() < header_len) + .is_none_or(|header_len| buffer.len() < header_len) { return Err(()); } diff --git a/watcher-utils/src/best_target.rs b/watcher-utils/src/best_target.rs index dae4bfa..40e5ede 100644 --- a/watcher-utils/src/best_target.rs +++ b/watcher-utils/src/best_target.rs @@ -78,7 +78,7 @@ impl> BestMimeTypeFinder { chromium_custom } else if mime.starts_with("text/") { any_text - } else if mime.chars().next().map_or(true, char::is_lowercase) { + } else if mime.chars().next().is_none_or(char::is_lowercase) { other } else { return;