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 4
4
#![ warn( clippy:: needless_borrow) ]
5
5
#![ warn( clippy:: redundant_clone) ]
6
6
7
- use std:: collections:: BTreeSet ;
7
+ use std:: collections:: { BTreeMap , BTreeSet } ;
8
8
use std:: env;
9
9
use std:: fs;
10
10
use std:: path:: { Path , PathBuf } ;
@@ -115,11 +115,8 @@ fn list_commands(config: &Config) -> BTreeSet<CommandInfo> {
115
115
116
116
/// List all runnable aliases
117
117
fn 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 ( ) ,
123
120
Err ( _) => Vec :: new ( ) ,
124
121
}
125
122
}
You can’t perform that action at this time.
0 commit comments