Skip to content

Commit

Permalink
fix: remove unnecessary arg value existence check
Browse files Browse the repository at this point in the history
  • Loading branch information
weihanglo committed Oct 28, 2020
1 parent b9554f3 commit 4b9c503
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/pkgid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn cli() -> App {

pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
let ws = args.workspace(config)?;
if !args.is_present("spec") && args.is_present_with_zero_values("package") {
if args.is_present_with_zero_values("package") {
print_available_packages(&ws)?
}
let spec = args.value_of("spec").or_else(|| args.value_of("package"));
Expand Down

0 comments on commit 4b9c503

Please sign in to comment.