Skip to content

Commit d3e01a6

Browse files
committed
Drop extra fmt command line argument provided by cargo
1 parent bf36b17 commit d3e01a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/cargo-fmt/main.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ const SUCCESS: i32 = 0;
6161
const FAILURE: i32 = 1;
6262

6363
fn execute() -> i32 {
64-
let opts = Opts::from_args();
64+
// Drop extra `fmt` argument provided by `cargo`.
65+
let args = env::args().filter(|x| x != "fmt");
66+
let opts = Opts::from_iter(args);
6567

6668
let verbosity = match (opts.verbose, opts.quiet) {
6769
(false, false) => Verbosity::Normal,

0 commit comments

Comments
 (0)