From 3bd2a1baa7d426f9efcdbfeb2411efc01359b2dd Mon Sep 17 00:00:00 2001 From: gwenn Date: Fri, 6 Dec 2024 18:14:52 +0100 Subject: [PATCH] Fix clippy warnings --- src/history.rs | 2 +- src/sqlite_history.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/history.rs b/src/history.rs index f3237d7aa..51abe637f 100644 --- a/src/history.rs +++ b/src/history.rs @@ -259,7 +259,7 @@ impl MemHistory { return true; } if line.is_empty() - || (self.ignore_space && line.chars().next().map_or(true, char::is_whitespace)) + || (self.ignore_space && line.chars().next().is_none_or(char::is_whitespace)) { return true; } diff --git a/src/sqlite_history.rs b/src/sqlite_history.rs index 867f5b7d5..3d1fd8c95 100644 --- a/src/sqlite_history.rs +++ b/src/sqlite_history.rs @@ -162,7 +162,7 @@ COMMIT; return true; } if line.is_empty() - || (self.ignore_space && line.chars().next().map_or(true, char::is_whitespace)) + || (self.ignore_space && line.chars().next().is_none_or(char::is_whitespace)) { return true; } @@ -372,7 +372,7 @@ PRAGMA incremental_vacuum; // TODO check that there is no memory entries (session_id == 0) ? self.reset(path)?; self.check_schema()?; - } else if self.path.as_ref().map_or(true, |p| p != path) { + } else if self.path.as_ref().is_none_or(|p| p != path) { self.reset(path)?; self.check_schema()?; }