mirror of https://github.com/ctz/rustls
Ask rustfmt to make our imports consistent
These are nightly-only options: so keep them in a separate file. When it sees unstable features, stable rustfmt gives a diagnostic like: > Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel. > Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel. But: _does_ otherwise format the files and exit non-zero. However, this is noisy. We arrange that `cargo +nightly fmt-unstable` also does the right thing.
This commit is contained in:
parent
bce2e5e241
commit
b6f283ed79
|
@ -0,0 +1,3 @@
|
|||
[alias]
|
||||
|
||||
fmt-unstable = ["fmt", "--", "--config-path", ".rustfmt.unstable.toml"]
|
|
@ -0,0 +1,6 @@
|
|||
# keep in sync with .rustfmt.toml
|
||||
chain_width = 40
|
||||
|
||||
# format imports
|
||||
group_imports = "StdExternalCrate"
|
||||
imports_granularity = "Module"
|
Loading…
Reference in New Issue