We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ff3e880 commit 0f157f5Copy full SHA for 0f157f5
src/bin/cargo/main.rs
@@ -4,7 +4,7 @@
4
#![warn(clippy::needless_borrow)]
5
#![warn(clippy::redundant_clone)]
6
7
-use std::collections::BTreeSet;
+use std::collections::{BTreeMap, BTreeSet};
8
use std::env;
9
use std::fs;
10
use std::path::{Path, PathBuf};
@@ -115,11 +115,8 @@ fn list_commands(config: &Config) -> BTreeSet<CommandInfo> {
115
116
/// List all runnable aliases
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
- },
+ match config.get::<BTreeMap<String, String>>("alias") {
+ Ok(aliases) => aliases.keys().map(|a| a.to_string()).collect(),
123
Err(_) => Vec::new(),
124
}
125
0 commit comments