about summary refs log tree commit diff
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2019-06-25 14:41:10 -0700
committerManish Goregaokar <manishsmail@gmail.com>2019-06-25 14:41:10 -0700
commite3619a6507f037fc20dae77c971b3ce281b2b8c1 (patch)
tree48a5237127d6eb7a9d8c90a278f008853cc02bf9
parent4a6914bb8c46e58990f0197212319f8ce1495737 (diff)
downloadrust-e3619a6507f037fc20dae77c971b3ce281b2b8c1.tar.gz
rust-e3619a6507f037fc20dae77c971b3ce281b2b8c1.zip
fmt
-rw-r--r--clippy_lints/src/functions.rs6
-rw-r--r--clippy_lints/src/needless_pass_by_value.rs6
-rw-r--r--clippy_lints/src/trivially_copy_pass_by_ref.rs6
3 files changed, 3 insertions, 15 deletions
diff --git a/clippy_lints/src/functions.rs b/clippy_lints/src/functions.rs
index 1c72b60b320..1a163e682ef 100644
--- a/clippy_lints/src/functions.rs
+++ b/clippy_lints/src/functions.rs
@@ -107,11 +107,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Functions {
         span: Span,
         hir_id: hir::HirId,
     ) {
-        let is_impl = if let Some(hir::Node::Item(item)) = cx
-            .tcx
-            .hir()
-            .find(cx.tcx.hir().get_parent_node(hir_id))
-        {
+        let is_impl = if let Some(hir::Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
             matches!(item.node, hir::ItemKind::Impl(_, _, _, _, Some(_), _, _))
         } else {
             false
diff --git a/clippy_lints/src/needless_pass_by_value.rs b/clippy_lints/src/needless_pass_by_value.rs
index 1409e9725c3..84dd26647ba 100644
--- a/clippy_lints/src/needless_pass_by_value.rs
+++ b/clippy_lints/src/needless_pass_by_value.rs
@@ -88,11 +88,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NeedlessPassByValue {
         }
 
         // Exclude non-inherent impls
-        if let Some(Node::Item(item)) = cx
-            .tcx
-            .hir()
-            .find(cx.tcx.hir().get_parent_node(hir_id))
-        {
+        if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
             if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
                 ItemKind::Trait(..))
             {
diff --git a/clippy_lints/src/trivially_copy_pass_by_ref.rs b/clippy_lints/src/trivially_copy_pass_by_ref.rs
index b3a3b0a658b..83dcdc79c94 100644
--- a/clippy_lints/src/trivially_copy_pass_by_ref.rs
+++ b/clippy_lints/src/trivially_copy_pass_by_ref.rs
@@ -179,11 +179,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TriviallyCopyPassByRef {
         }
 
         // Exclude non-inherent impls
-        if let Some(Node::Item(item)) = cx
-            .tcx
-            .hir()
-            .find(cx.tcx.hir().get_parent_node(hir_id))
-        {
+        if let Some(Node::Item(item)) = cx.tcx.hir().find(cx.tcx.hir().get_parent_node(hir_id)) {
             if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
                 ItemKind::Trait(..))
             {