Skip to content

Commit 305c640

Browse files
committed
Review changes
1 parent 1c17dbb commit 305c640

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Configurations.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1243,9 +1243,10 @@ fn adipiscing() -> usize {}
12431243

12441244
## `reorder_imports`
12451245

1246-
Reorder import and extern crate statements alphabetically
1246+
Reorder import and extern crate statements alphabetically in groups (a group is
1247+
separated by a newline).
12471248

1248-
- **Default value**: `false`
1249+
- **Default value**: `true`
12491250
- **Possible values**: `true`, `false`
12501251
- **Stable**: No
12511252

src/config/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ create_config! {
6868
imports_layout: ListTactic, ListTactic::Mixed, false, "Item layout inside a import block";
6969

7070
// Ordering
71-
reorder_impl_items: bool, false, false, "Reorder impl items";
7271
reorder_imports: bool, true, false, "Reorder import and extern crate statements alphabetically";
7372
reorder_modules: bool, true, false, "Reorder module statements alphabetically in group";
73+
reorder_impl_items: bool, false, false, "Reorder impl items";
7474

7575
// Spaces around punctuation
7676
type_punctuation_density: TypeDensity, TypeDensity::Wide, false,

src/reorder.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ impl ReorderableItemKind {
207207

208208
pub fn in_group(&self) -> bool {
209209
match *self {
210-
ReorderableItemKind::ExternCrate => true,
211-
ReorderableItemKind::Mod => true,
212-
ReorderableItemKind::Use => true,
210+
ReorderableItemKind::ExternCrate
211+
| ReorderableItemKind::Mod
212+
| ReorderableItemKind::Use => true,
213213
ReorderableItemKind::Other => false,
214214
}
215215
}

0 commit comments

Comments
 (0)