Skip to content

Commit 1a6312e

Browse files
committed
Format clippy
1 parent 45db716 commit 1a6312e

File tree

4 files changed

+4
-16
lines changed

4 files changed

+4
-16
lines changed

Diff for: src/tools/clippy/clippy_lints/src/non_copy_const.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,7 @@ fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: D
188188

189189
let result = cx.tcx.const_eval_resolve(
190190
cx.param_env,
191-
ty::Unevaluated::new(
192-
ty::WithOptConstParam::unknown(def_id),
193-
substs,
194-
),
191+
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
195192
None,
196193
);
197194
is_value_unfrozen_raw(cx, result, ty)

Diff for: src/tools/clippy/clippy_lints/src/redundant_clone.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -624,10 +624,7 @@ impl<'a, 'tcx> mir::visit::Visitor<'tcx> for PossibleBorrowerVisitor<'a, 'tcx> {
624624
.flat_map(HybridBitSet::iter)
625625
.collect();
626626

627-
if ContainsRegion
628-
.visit_ty(self.body.local_decls[*dest].ty)
629-
.is_break()
630-
{
627+
if ContainsRegion.visit_ty(self.body.local_decls[*dest].ty).is_break() {
631628
mutable_variables.push(*dest);
632629
}
633630

Diff for: src/tools/clippy/clippy_lints/src/unnecessary_sort_by.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,7 @@ fn detect_lint(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<LintTrigger> {
224224

225225
fn expr_borrows(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
226226
let ty = cx.typeck_results().expr_ty(expr);
227-
matches!(ty.kind(), ty::Ref(..))
228-
|| ty
229-
.walk()
230-
.any(|arg| matches!(arg.unpack(), GenericArgKind::Lifetime(_)))
227+
matches!(ty.kind(), ty::Ref(..)) || ty.walk().any(|arg| matches!(arg.unpack(), GenericArgKind::Lifetime(_)))
231228
}
232229

233230
impl LateLintPass<'_> for UnnecessarySortBy {

Diff for: src/tools/clippy/clippy_utils/src/consts.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -413,10 +413,7 @@ impl<'a, 'tcx> ConstEvalLateContext<'a, 'tcx> {
413413
.tcx
414414
.const_eval_resolve(
415415
self.param_env,
416-
ty::Unevaluated::new(
417-
ty::WithOptConstParam::unknown(def_id),
418-
substs,
419-
),
416+
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
420417
None,
421418
)
422419
.ok()

0 commit comments

Comments
 (0)