File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,10 +102,7 @@ pub enum ReconnectionStrictness {
102102
103103impl 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments