Use is_some_and/is_ok_and in less obvious spots
This commit is contained in:
@@ -630,11 +630,11 @@ fn codegen_stmt<'tcx>(
|
||||
let to_ty = fx.monomorphize(to_ty);
|
||||
|
||||
fn is_fat_ptr<'tcx>(fx: &FunctionCx<'_, '_, 'tcx>, ty: Ty<'tcx>) -> bool {
|
||||
ty.builtin_deref(true)
|
||||
.map(|ty::TypeAndMut { ty: pointee_ty, mutbl: _ }| {
|
||||
ty.builtin_deref(true).is_some_and(
|
||||
|ty::TypeAndMut { ty: pointee_ty, mutbl: _ }| {
|
||||
has_ptr_meta(fx.tcx, pointee_ty)
|
||||
})
|
||||
.unwrap_or(false)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
if is_fat_ptr(fx, from_ty) {
|
||||
|
||||
Reference in New Issue
Block a user