update rustfmt flags that should work without targets
This commit is contained in:
parent
d9149fb52e
commit
56a3d039ce
@ -147,7 +147,11 @@ fn format_crate(
|
||||
strategy: &CargoFmtStrategy,
|
||||
) -> Result<ExitStatus, io::Error> {
|
||||
let rustfmt_args = get_fmt_args();
|
||||
let targets = if rustfmt_args.iter().any(|s| s == "--dump-default-config") {
|
||||
let targets = if rustfmt_args
|
||||
.iter()
|
||||
.any(|s| ["--print-config", "-h", "--help", "-V", "--verison"]
|
||||
.contains(&s.as_str()))
|
||||
{
|
||||
HashSet::new()
|
||||
} else {
|
||||
get_targets(strategy)?
|
||||
|
Loading…
x
Reference in New Issue
Block a user