Review changes

This commit is contained in:
Nick Cameron 2018-04-11 10:50:19 +12:00
parent 1c17dbbf74
commit 305c640553
3 changed files with 7 additions and 6 deletions

View File

@ -1243,9 +1243,10 @@ fn adipiscing() -> usize {}
## `reorder_imports`
Reorder import and extern crate statements alphabetically
Reorder import and extern crate statements alphabetically in groups (a group is
separated by a newline).
- **Default value**: `false`
- **Default value**: `true`
- **Possible values**: `true`, `false`
- **Stable**: No

View File

@ -68,9 +68,9 @@
imports_layout: ListTactic, ListTactic::Mixed, false, "Item layout inside a import block";
// Ordering
reorder_impl_items: bool, false, false, "Reorder impl items";
reorder_imports: bool, true, false, "Reorder import and extern crate statements alphabetically";
reorder_modules: bool, true, false, "Reorder module statements alphabetically in group";
reorder_impl_items: bool, false, false, "Reorder impl items";
// Spaces around punctuation
type_punctuation_density: TypeDensity, TypeDensity::Wide, false,

View File

@ -207,9 +207,9 @@ pub fn is_reorderable(&self, config: &Config) -> bool {
pub fn in_group(&self) -> bool {
match *self {
ReorderableItemKind::ExternCrate => true,
ReorderableItemKind::Mod => true,
ReorderableItemKind::Use => true,
ReorderableItemKind::ExternCrate
| ReorderableItemKind::Mod
| ReorderableItemKind::Use => true,
ReorderableItemKind::Other => false,
}
}