Skip to content

Commit 0a64bfd

Browse files
committed
Remove uncessary parens in closure body with unused lint
1 parent 5228e28 commit 0a64bfd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clippy_lints/src/unused_async.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedAsync {
169169
let iter = self
170170
.unused_async_fns
171171
.iter()
172-
.filter(|UnusedAsyncFn { def_id, .. }| (!self.async_fns_as_value.contains(def_id)));
172+
.filter(|UnusedAsyncFn { def_id, .. }| !self.async_fns_as_value.contains(def_id));
173173

174174
for fun in iter {
175175
span_lint_hir_and_then(

clippy_utils/src/ty/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,7 @@ impl AdtVariantInfo {
889889
.enumerate()
890890
.map(|(i, f)| (i, approx_ty_size(cx, f.ty(cx.tcx, subst))))
891891
.collect::<Vec<_>>();
892-
fields_size.sort_by(|(_, a_size), (_, b_size)| (a_size.cmp(b_size)));
892+
fields_size.sort_by(|(_, a_size), (_, b_size)| a_size.cmp(b_size));
893893

894894
Self {
895895
ind: i,
@@ -898,7 +898,7 @@ impl AdtVariantInfo {
898898
}
899899
})
900900
.collect::<Vec<_>>();
901-
variants_size.sort_by(|a, b| (b.size.cmp(&a.size)));
901+
variants_size.sort_by(|a, b| b.size.cmp(&a.size));
902902
variants_size
903903
}
904904
}

0 commit comments

Comments
 (0)