Skip to content

Commit 8e1cd9e

Browse files
authored
Merge pull request #3515 from matthiaskrgr/fmt
run rustfmt
2 parents a3c77f6 + 273dc82 commit 8e1cd9e

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1358,7 +1358,10 @@ fn lint_clone_on_copy(cx: &LateContext<'_, '_>, expr: &hir::Expr, arg: &hir::Exp
13581358
_ => {},
13591359
}
13601360

1361-
let deref_count = cx.tables.expr_adjustments(arg).iter()
1361+
let deref_count = cx
1362+
.tables
1363+
.expr_adjustments(arg)
1364+
.iter()
13621365
.filter(|adj| {
13631366
if let ty::adjustment::Adjust::Deref(_) = adj.kind {
13641367
true

clippy_lints/src/types.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ use crate::utils::{
3030
clip, comparisons, differing_macro_contexts, higher, in_constant, in_macro, int_bits, last_path_segment,
3131
match_def_path, match_path, multispan_sugg, opt_def_id, same_tys, sext, snippet, snippet_opt,
3232
snippet_with_applicability, span_help_and_lint, span_lint, span_lint_and_sugg, span_lint_and_then, unsext,
33-
AbsolutePathBuffer
33+
AbsolutePathBuffer,
3434
};
3535
use if_chain::if_chain;
3636
use std::borrow::Cow;
@@ -1031,9 +1031,11 @@ fn is_c_void(tcx: TyCtxt<'_, '_, '_>, ty: Ty<'_>) -> bool {
10311031
let mut apb = AbsolutePathBuffer { names: vec![] };
10321032
tcx.push_item_path(&mut apb, adt.did, false);
10331033

1034-
if apb.names.is_empty() { return false }
1034+
if apb.names.is_empty() {
1035+
return false;
1036+
}
10351037
if apb.names[0] == "libc" || apb.names[0] == "core" && *apb.names.last().unwrap() == "c_void" {
1036-
return true
1038+
return true;
10371039
}
10381040
}
10391041
false

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ use crate::syntax::ast::{self, LitKind};
2828
use crate::syntax::attr;
2929
use crate::syntax::errors::DiagnosticBuilder;
3030
use crate::syntax::source_map::{Span, DUMMY_SP};
31-
use crate::syntax::symbol::{keywords, Symbol};
3231
use crate::syntax::symbol;
32+
use crate::syntax::symbol::{keywords, Symbol};
3333
use if_chain::if_chain;
3434
use matches::matches;
3535
use std::borrow::Cow;

0 commit comments

Comments
 (0)