Skip to content

Commit

Permalink
Merge pull request #831 from gwenn/clippy
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
gwenn authored Dec 6, 2024
2 parents 4b8f41a + 3bd2a1b commit 5b92355
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/sqlite_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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()?;
}
Expand Down

0 comments on commit 5b92355

Please sign in to comment.