Skip to content

Commit

Permalink
chore: fix clippy lints from Rust nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiapple852 committed Nov 29, 2024
1 parent 32ac48a commit 611f70c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions crates/trippy-core/src/strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,5 @@ mod state {

/// Returns true if the duration between start and end is grater than a duration, false otherwise.
fn exceeds(start: Option<SystemTime>, end: SystemTime, dur: Duration) -> bool {
start.map_or(false, |start| {
end.duration_since(start).unwrap_or_default() > dur
})
start.is_some_and(|start| end.duration_since(start).unwrap_or_default() > dur)
}
4 changes: 1 addition & 3 deletions crates/trippy-tui/src/frontend/binding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ pub struct KeyBinding {
impl KeyBinding {
pub fn check(&self, event: KeyEvent) -> bool {
let code_match = match (event.code, self.code) {
(KeyCode::Char(c1), KeyCode::Char(c2)) => {
c1.to_ascii_lowercase() == c2.to_ascii_lowercase()
}
(KeyCode::Char(c1), KeyCode::Char(c2)) => c1.eq_ignore_ascii_case(&c2),
(c1, c2) => c1 == c2,
};
code_match && self.modifiers == event.modifiers
Expand Down

0 comments on commit 611f70c

Please sign in to comment.