Skip to content

Commit

Permalink
Resolve a single_match lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dwijnand committed Jul 31, 2018
1 parent a661b33 commit e55ecf9
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions src/bin/cargo/commands/fix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,15 @@ pub fn exec(config: &mut Config, args: &ArgMatches) -> CliResult {
// Unlike other commands default `cargo fix` to all targets to fix as much
// code as we can.
let mut opts = args.compile_options(config, mode)?;
match opts.filter {
CompileFilter::Default { .. } => {
opts.filter = CompileFilter::Only {
all_targets: true,
lib: true,
bins: FilterRule::All,
examples: FilterRule::All,
benches: FilterRule::All,
tests: FilterRule::All,
};
if let CompileFilter::Default { .. } = opts.filter {
opts.filter = CompileFilter::Only {
all_targets: true,
lib: true,
bins: FilterRule::All,
examples: FilterRule::All,
benches: FilterRule::All,
tests: FilterRule::All,
}
_ => {}
}
ops::fix(&ws, &mut ops::FixOptions {
edition: args.value_of("edition"),
Expand Down

0 comments on commit e55ecf9

Please sign in to comment.