Skip to content

Commit fefcca1

Browse files
committed
it was still a little broken
1 parent 8b1f599 commit fefcca1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/bin/cargo/commands/fix.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
131131
// code as we can.
132132
let mut opts = args.compile_options(config, mode, Some(&ws))?;
133133

134+
let use_clippy = args.is_present("clippy");
135+
134136
let clippy_args = args
135137
.value_of("clippy") // always yields None
136138
.map(|s| s.split(' ').map(|s| s.to_string()).collect())
137-
.or_else(|| Some(vec![]));
138-
139-
let use_clippy = args.is_present("clippy") || clippy_args.is_some();
139+
.or_else(|| Some(vec![]))
140+
.filter(|_| use_clippy);
140141

141142
if use_clippy && !config.cli_unstable().unstable_options {
142143
return Err(failure::format_err!(

0 commit comments

Comments
 (0)