Merge pull request #2768 from king6cong/master
update rustfmt flags that should work without targets
This commit is contained in:
commit
9e208cb13a
@ -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…
Reference in New Issue
Block a user