mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-24 05:33:41 +00:00
Remove --write-mode=replace
from cargo-fmt
Since replace is the default rustfmt write mode, there's no need to call rustfmt with `--write-mode=replace`. As a bonus, it is now also possible to override the write-mode.
This commit is contained in:
parent
ecf12778fb
commit
c578ad8df5
@ -69,11 +69,8 @@ fn format_crate(opts: &Options) {
|
||||
}
|
||||
|
||||
fn get_fmt_args() -> Vec<String> {
|
||||
let mut args = vec!["--write-mode=replace".to_string()];
|
||||
// All arguments after -- are passed to rustfmt
|
||||
args.extend(env::args().skip_while(|a| a != "--").skip(1));
|
||||
|
||||
args
|
||||
env::args().skip_while(|a| a != "--").skip(1).collect()
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
|
Loading…
Reference in New Issue
Block a user