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 @@ create_config! {
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 @@ impl ReorderableItemKind {
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,
}
}