]> git.lizzy.rs Git - rust.git/commitdiff
fix formatting
authorljedrz <ljedrz@gmail.com>
Sun, 24 Feb 2019 14:16:16 +0000 (15:16 +0100)
committerljedrz <ljedrz@gmail.com>
Sun, 24 Feb 2019 14:16:16 +0000 (15:16 +0100)
clippy_lints/src/functions.rs
clippy_lints/src/needless_pass_by_value.rs
clippy_lints/src/redundant_clone.rs
clippy_lints/src/trivially_copy_pass_by_ref.rs
clippy_lints/src/types.rs

index 7ea01ad5ec95034122f58fcdd45859276fe37adc..53703ef9bce2d2e2b0332595dae3b354622b58c1 100644 (file)
@@ -114,8 +114,10 @@ fn check_fn(
         span: Span,
         hir_id: hir::HirId,
     ) {
-        let is_impl = if let Some(hir::Node::Item(item)) = cx.tcx.hir().find_by_hir_id(
-            cx.tcx.hir().get_parent_node_by_hir_id(hir_id))
+        let is_impl = if let Some(hir::Node::Item(item)) = cx
+            .tcx
+            .hir()
+            .find_by_hir_id(cx.tcx.hir().get_parent_node_by_hir_id(hir_id))
         {
             matches!(item.node, hir::ItemKind::Impl(_, _, _, _, Some(_), _, _))
         } else {
index d77d95a9fffeaf18ca46fd909d79c9d9a4af265c..fb78dd01f5e5b6b0954a9f27927afeabc234c687 100644 (file)
@@ -103,8 +103,10 @@ fn check_fn(
         }
 
         // Exclude non-inherent impls
-        if let Some(Node::Item(item)) = cx.tcx.hir().find_by_hir_id(
-            cx.tcx.hir().get_parent_node_by_hir_id(hir_id))
+        if let Some(Node::Item(item)) = cx
+            .tcx
+            .hir()
+            .find_by_hir_id(cx.tcx.hir().get_parent_node_by_hir_id(hir_id))
         {
             if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
                 ItemKind::Trait(..))
index 0fd10d7796c586d059d5754661869f1fc9831b6f..a80fd311c3dd17ca37131528538dba1648082742 100644 (file)
@@ -16,9 +16,7 @@
 use rustc::{declare_tool_lint, lint_array};
 use rustc_errors::Applicability;
 use std::convert::TryFrom;
-use syntax::{
-    source_map::{BytePos, Span},
-};
+use syntax::source_map::{BytePos, Span};
 
 macro_rules! unwrap_or_continue {
     ($x:expr) => {
index 5174af9f7f42b0f648641fa0ead353c90adae310..59e6bcedbe54577603b145e1d54db5d88b5511b1 100644 (file)
@@ -186,8 +186,10 @@ fn check_fn(
         }
 
         // Exclude non-inherent impls
-        if let Some(Node::Item(item)) = cx.tcx.hir().find_by_hir_id(
-            cx.tcx.hir().get_parent_node_by_hir_id(hir_id))
+        if let Some(Node::Item(item)) = cx
+            .tcx
+            .hir()
+            .find_by_hir_id(cx.tcx.hir().get_parent_node_by_hir_id(hir_id))
         {
             if matches!(item.node, ItemKind::Impl(_, _, _, _, Some(_), _, _) |
                 ItemKind::Trait(..))
index ff1eb459128935adc3642733f52c2bb57a8e87ce..dc11195950226e96ba5c2b8c717c5e49f1869e6e 100644 (file)
@@ -174,19 +174,9 @@ fn name(&self) -> &'static str {
 }
 
 impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypePass {
-    fn check_fn(
-        &mut self,
-        cx: &LateContext<'_, '_>,
-        _: FnKind<'_>,
-        decl: &FnDecl,
-        _: &Body,
-        _: Span,
-        id: HirId,
-    ) {
+    fn check_fn(&mut self, cx: &LateContext<'_, '_>, _: FnKind<'_>, decl: &FnDecl, _: &Body, _: Span, id: HirId) {
         // skip trait implementations, see #605
-        if let Some(hir::Node::Item(item)) = cx.tcx.hir().find_by_hir_id(
-            cx.tcx.hir().get_parent_item(id))
-        {
+        if let Some(hir::Node::Item(item)) = cx.tcx.hir().find_by_hir_id(cx.tcx.hir().get_parent_item(id)) {
             if let ItemKind::Impl(_, _, _, _, Some(..), _, _) = item.node {
                 return;
             }