Skip to content

Commit 5b6ba20

Browse files
committed
fmt
1 parent 2ba1926 commit 5b6ba20

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

clippy_lints/src/derivable_impls.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,10 @@ fn is_path_self(e: &Expr<'_>) -> bool {
7878

7979
fn contains_trait_object(cx: &LateContext<'_>, ty: ty::Ty<'_>) -> bool {
8080
match ty.kind() {
81-
ty::TyKind::Ref(_, ty, _) => {
82-
contains_trait_object(cx, *ty)
83-
},
81+
ty::TyKind::Ref(_, ty, _) => contains_trait_object(cx, *ty),
8482
ty::TyKind::Adt(def, substs) => {
8583
def.is_box() && substs[0].as_type().map_or(false, |ty| contains_trait_object(cx, ty))
86-
}
84+
},
8785
ty::TyKind::Dynamic(..) => true,
8886
_ => false,
8987
}
@@ -119,7 +117,7 @@ fn check_struct<'tcx>(
119117
let is_default_without_adjusts = |expr| {
120118
is_default_equivalent(cx, expr)
121119
&& typeck_results.expr_adjustments(expr).iter().all(|adj| {
122-
!matches!(adj.kind, Adjust::Pointer(PointerCast::Unsize)
120+
!matches!(adj.kind, Adjust::Pointer(PointerCast::Unsize)
123121
if contains_trait_object(cx, adj.target))
124122
})
125123
};

0 commit comments

Comments
 (0)