Skip to content

Commit 68096cf

Browse files
committed
fmt fixes
1 parent f3363b9 commit 68096cf

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

clippy_lints/src/escape.rs

+1-3
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ impl<'a, 'tcx> Delegate<'tcx> for EscapeDelegate<'a, 'tcx> {
112112
let map = &self.cx.tcx.hir();
113113
if map.is_argument(map.hir_to_node_id(consume_pat.hir_id)) {
114114
// Skip closure arguments
115-
if let Some(Node::Expr(..)) = map.find_by_hir_id(
116-
map.get_parent_node_by_hir_id(consume_pat.hir_id))
117-
{
115+
if let Some(Node::Expr(..)) = map.find_by_hir_id(map.get_parent_node_by_hir_id(consume_pat.hir_id)) {
118116
return;
119117
}
120118
if is_non_trait_box(cmt.ty) && !self.is_large_box(cmt.ty) {

clippy_lints/src/len_zero.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,10 @@ fn check_impl_items(cx: &LateContext<'_, '_>, item: &Item, impl_items: &[ImplIte
194194
}
195195

196196
let is_empty = if let Some(is_empty) = impl_items.iter().find(|i| is_named_self(cx, i, "is_empty")) {
197-
if cx.access_levels.is_exported(cx.tcx.hir().hir_to_node_id(is_empty.id.hir_id)) {
197+
if cx
198+
.access_levels
199+
.is_exported(cx.tcx.hir().hir_to_node_id(is_empty.id.hir_id))
200+
{
198201
return;
199202
} else {
200203
"a private"

clippy_lints/src/loops.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -2051,9 +2051,9 @@ enum VarState {
20512051

20522052
/// Scan a for loop for variables that are incremented exactly once.
20532053
struct IncrementVisitor<'a, 'tcx: 'a> {
2054-
cx: &'a LateContext<'a, 'tcx>, // context reference
2055-
states: FxHashMap<HirId, VarState>, // incremented variables
2056-
depth: u32, // depth of conditional expressions
2054+
cx: &'a LateContext<'a, 'tcx>, // context reference
2055+
states: FxHashMap<HirId, VarState>, // incremented variables
2056+
depth: u32, // depth of conditional expressions
20572057
done: bool,
20582058
}
20592059

0 commit comments

Comments
 (0)