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()?; }