File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 44#![ warn( clippy:: needless_borrow) ]
55#![ warn( clippy:: redundant_clone) ]
66
7- use std:: collections:: BTreeSet ;
7+ use std:: collections:: { BTreeMap , BTreeSet } ;
88use std:: env;
99use std:: fs;
1010use std:: path:: { Path , PathBuf } ;
@@ -115,11 +115,8 @@ fn list_commands(config: &Config) -> BTreeSet<CommandInfo> {
115115
116116/// List all runnable aliases
117117fn list_aliases ( config : & Config ) -> Vec < String > {
118- match config. get_table ( "alias" ) {
119- Ok ( table) => match table {
120- Some ( aliases) => aliases. val . keys ( ) . map ( |a| a. to_string ( ) ) . collect ( ) ,
121- None => Vec :: new ( ) ,
122- } ,
118+ match config. get :: < BTreeMap < String , String > > ( "alias" ) {
119+ Ok ( aliases) => aliases. keys ( ) . map ( |a| a. to_string ( ) ) . collect ( ) ,
123120 Err ( _) => Vec :: new ( ) ,
124121 }
125122}
You can’t perform that action at this time.
0 commit comments