From 488e6fda12116d3b407e6137cf083d1bbf603254 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Tue, 19 Jun 2018 14:36:50 +1200 Subject: [PATCH] Remove some unnecessary `pub`s --- src/reorder.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/reorder.rs b/src/reorder.rs index 027b64e8317a..343bbb497bd6 100644 --- a/src/reorder.rs +++ b/src/reorder.rs @@ -194,7 +194,7 @@ enum ReorderableItemKind { } impl ReorderableItemKind { - pub fn from(item: &ast::Item) -> Self { + fn from(item: &ast::Item) -> Self { match item.node { _ if contains_macro_use_attr(item) => ReorderableItemKind::Other, ast::ItemKind::ExternCrate(..) => ReorderableItemKind::ExternCrate, @@ -204,11 +204,11 @@ impl ReorderableItemKind { } } - pub fn is_same_item_kind(&self, item: &ast::Item) -> bool { + fn is_same_item_kind(&self, item: &ast::Item) -> bool { ReorderableItemKind::from(item) == *self } - pub fn is_reorderable(&self, config: &Config) -> bool { + fn is_reorderable(&self, config: &Config) -> bool { match *self { ReorderableItemKind::ExternCrate => config.reorder_imports(), ReorderableItemKind::Mod => config.reorder_modules(), @@ -217,7 +217,7 @@ impl ReorderableItemKind { } } - pub fn in_group(&self) -> bool { + fn in_group(&self) -> bool { match *self { ReorderableItemKind::ExternCrate | ReorderableItemKind::Mod