Skip to content

Commit 24d1113

Browse files
committed
Appease Clippy
1 parent a1279c8 commit 24d1113

2 files changed

Lines changed: 5 additions & 11 deletions

File tree

src/serial/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,7 @@ pub enum ReconnectionStrictness {
102102

103103
impl ReconnectionStrictness {
104104
pub fn allowed(&self) -> bool {
105-
match self {
106-
ReconnectionStrictness::Disabled => false,
107-
_ => true,
108-
}
105+
matches!(self, ReconnectionStrictness::Disabled)
109106
}
110107
}
111108

src/tui/prompts.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,10 @@ pub trait PromptKeybind: Clone + strum::VariantArray + strum::EnumProperty {
2525
};
2626

2727
for letter in variant_binding.chars() {
28-
match (value, letter) {
29-
(KeyCode::Char(given_char), variant_char) => {
30-
if given_char == variant_char {
31-
return true;
32-
}
33-
}
34-
_ => (),
28+
if let (KeyCode::Char(given_char), variant_char) = (value, letter)
29+
&& given_char == variant_char
30+
{
31+
return true;
3532
}
3633
}
3734

0 commit comments

Comments
 (0)