Skip to content

Commit 5bba426

Browse files
committed
Remove a usage of get_list
This callsite doesn't need the full power of `get_list`, knowing the definition path of each element along the list.
1 parent 37ace88 commit 5bba426

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/bin/cargo/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ fn aliased_command(config: &Config, command: &str) -> CargoResult<Option<Vec<Str
6060
.collect(),
6161
),
6262
Ok(None) => None,
63-
Err(_) => config
64-
.get_list(&alias_name)?
65-
.map(|record| record.val.iter().map(|s| s.0.to_string()).collect()),
63+
Err(_) => config.get::<Option<Vec<String>>>(&alias_name)?,
6664
};
6765
let result = user_alias.or_else(|| match command {
6866
"b" => Some(vec!["build".to_string()]),

0 commit comments

Comments
 (0)