diff options
| author | Philipp Hansch <dev@phansch.net> | 2018-12-09 12:45:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-09 12:45:31 +0100 |
| commit | 8e1cd9e83e3bf0481d186acb9b9eaa7700173177 (patch) | |
| tree | 4e5443eb84bab2908f6e8d98aade36f2a4e64b11 | |
| parent | a3c77f6ad1c1c185e561e9cd7fdec7db569169d1 (diff) | |
| parent | 273dc828721204408a43607164816d250622f5db (diff) | |
| download | rust-8e1cd9e83e3bf0481d186acb9b9eaa7700173177.tar.gz rust-8e1cd9e83e3bf0481d186acb9b9eaa7700173177.zip | |
Merge pull request #3515 from matthiaskrgr/fmt
run rustfmt
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 5 | ||||
| -rw-r--r-- | clippy_lints/src/types.rs | 8 | ||||
| -rw-r--r-- | 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; |
