about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Scherer <github35764891676564198441@oli-obk.de>2019-01-22 16:27:42 +0100
committerOliver Scherer <github35764891676564198441@oli-obk.de>2019-01-22 16:27:42 +0100
commitd6c806378e6901b83d5ab8594dcd2c6347e0196a (patch)
tree542493b36dbec54617fbf13e1f5fe35c1e85c3d5
parent38cdf63acfd8a46ce5753a8767feab43c6382aa4 (diff)
Rustfmt all the things
-rw-r--r--clippy_lints/src/utils/mod.rs21
1 files changed, 16 insertions, 5 deletions
diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs
index a7af4a52714..c83b0f155fc 100644
--- a/clippy_lints/src/utils/mod.rs
+++ b/clippy_lints/src/utils/mod.rs
@@ -65,12 +65,23 @@ pub fn differing_macro_contexts(lhs: Span, rhs: Span) -> bool {
 pub fn in_constant(cx: &LateContext<'_, '_>, id: NodeId) -> bool {
     let parent_id = cx.tcx.hir().get_parent(id);
     match cx.tcx.hir().get(parent_id) {
-        | Node::Item(&Item { node: ItemKind::Const(..), .. })
-        | Node::TraitItem(&TraitItem { node: TraitItemKind::Const(..), .. })
-        | Node::ImplItem(&ImplItem { node: ImplItemKind::Const(..), .. })
+        Node::Item(&Item {
+            node: ItemKind::Const(..),
+            ..
+        })
+        | Node::TraitItem(&TraitItem {
+            node: TraitItemKind::Const(..),
+            ..
+        })
+        | Node::ImplItem(&ImplItem {
+            node: ImplItemKind::Const(..),
+            ..
+        })
         | Node::AnonConst(_)
-        | Node::Item(&Item { node: ItemKind::Static(..), .. })
-        => true,
+        | Node::Item(&Item {
+            node: ItemKind::Static(..),
+            ..
+        }) => true,
         _ => false,
     }
 }