Add merge_imports config option

This commit is contained in:
Seiichi Uchida 2018-04-06 22:34:41 +09:00 committed by Seiichi Uchida
parent 805987b4b1
commit 5dd203eabe
2 changed files with 23 additions and 0 deletions

View file

@ -1084,6 +1084,28 @@ use foo::{aaa,
fff};
```
## `merge_imports`
Merge multiple imports into a single nested import.
- **Default value**: `false`
- **Possible values**: `true`, `false`
- **Stable**: No
#### `false` (default):
```rust
use foo::{a, c, d};
use foo::{b, g};
use foo::{e, f};
```
#### `true`:
```rust
use foo::{a, b, c, d, e, f, g};
```
## `match_block_trailing_comma`

View file

@ -66,6 +66,7 @@ create_config! {
// Imports
imports_indent: IndentStyle, IndentStyle::Visual, false, "Indent of imports";
imports_layout: ListTactic, ListTactic::Mixed, false, "Item layout inside a import block";
merge_imports: bool, false, false, "Merge imports";
// Ordering
reorder_extern_crates: bool, true, false, "Reorder extern crate statements alphabetically";