From 273dc828721204408a43607164816d250622f5db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Sun, 9 Dec 2018 12:03:10 +0100 Subject: [PATCH] run rustfmt --- clippy_lints/src/methods/mod.rs | 5 ++++- clippy_lints/src/types.rs | 8 +++++--- clippy_lints/src/utils/mod.rs | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index d311f76074c..384e027db27 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -1358,7 +1358,10 @@ fn lint_clone_on_copy(cx: &LateContext<'_, '_>, expr: &hir::Expr, arg: &hir::Exp _ => {}, } - let deref_count = cx.tables.expr_adjustments(arg).iter() + let deref_count = cx + .tables + .expr_adjustments(arg) + .iter() .filter(|adj| { if let ty::adjustment::Adjust::Deref(_) = adj.kind { true diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index f9a0d611429..820f2fdf32d 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -30,7 +30,7 @@ use crate::utils::{ clip, comparisons, differing_macro_contexts, higher, in_constant, in_macro, int_bits, last_path_segment, match_def_path, match_path, multispan_sugg, opt_def_id, same_tys, sext, snippet, snippet_opt, snippet_with_applicability, span_help_and_lint, span_lint, span_lint_and_sugg, span_lint_and_then, unsext, - AbsolutePathBuffer + AbsolutePathBuffer, }; use if_chain::if_chain; use std::borrow::Cow; @@ -1031,9 +1031,11 @@ fn is_c_void(tcx: TyCtxt<'_, '_, '_>, ty: Ty<'_>) -> bool { let mut apb = AbsolutePathBuffer { names: vec![] }; tcx.push_item_path(&mut apb, adt.did, false); - if apb.names.is_empty() { return false } + if apb.names.is_empty() { + return false; + } if apb.names[0] == "libc" || apb.names[0] == "core" && *apb.names.last().unwrap() == "c_void" { - return true + return true; } } false diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index 68357b08d6c..6b556b43888 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -28,8 +28,8 @@ use crate::syntax::ast::{self, LitKind}; use crate::syntax::attr; use crate::syntax::errors::DiagnosticBuilder; use crate::syntax::source_map::{Span, DUMMY_SP}; -use crate::syntax::symbol::{keywords, Symbol}; use crate::syntax::symbol; +use crate::syntax::symbol::{keywords, Symbol}; use if_chain::if_chain; use matches::matches; use std::borrow::Cow;