File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -621,13 +621,10 @@ impl Explorer {
621
621
pub fn find_entries_with_initial ( & self , initial : char ) -> Option < FilteredEntries > {
622
622
let parent_dir_entry = parent_dir_entry ( ) ;
623
623
let initial_lower = initial. to_lowercase ( ) . next ( ) ; // Get the first character after lowercasing
624
-
624
+
625
625
// If initial_lower is None (rare, but possible), return None early
626
- let initial_lower = match initial_lower {
627
- Some ( c) => c,
628
- None => return None ,
629
- } ;
630
-
626
+ let initial_lower = initial_lower?;
627
+
631
628
let entries: Vec < _ > = self
632
629
. items
633
630
. iter ( )
@@ -645,14 +642,13 @@ impl Explorer {
645
642
} )
646
643
} )
647
644
. collect ( ) ;
648
-
645
+
649
646
if entries. is_empty ( ) {
650
647
None
651
648
} else {
652
649
Some ( FilteredEntries :: new ( initial, entries) )
653
650
}
654
651
}
655
-
656
652
657
653
pub fn find_entries_by_name (
658
654
tx : UnboundedSender < Action > ,
You can’t perform that action at this time.
0 commit comments