Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate towards exclusively using serde for Config #7456

Merged
merged 20 commits into from
Oct 9, 2019
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
alexcrichton committed Oct 8, 2019
commit 5bba42615a0941cdfdb835fa0b65dfa9074918f0
4 changes: 1 addition & 3 deletions src/bin/cargo/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ fn aliased_command(config: &Config, command: &str) -> CargoResult<Option<Vec<Str
.collect(),
),
Ok(None) => None,
Err(_) => config
.get_list(&alias_name)?
.map(|record| record.val.iter().map(|s| s.0.to_string()).collect()),
Err(_) => config.get::<Option<Vec<String>>>(&alias_name)?,
};
let result = user_alias.or_else(|| match command {
"b" => Some(vec!["build".to_string()]),
Expand Down