1
Fork 0

Run clippy --fix for unnecessary_map_or lint

This commit is contained in:
Yotam Ofek 2025-01-19 19:15:00 +00:00
parent 39dc268459
commit 264fa0fc54
39 changed files with 61 additions and 67 deletions

View file

@ -442,7 +442,7 @@ pub(crate) fn type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, t: Ty<'tcx>) ->
// (or if there is no allocator argument).
ty::Adt(def, args)
if def.is_box()
&& args.get(1).map_or(true, |arg| cx.layout_of(arg.expect_ty()).is_1zst()) =>
&& args.get(1).is_none_or(|arg| cx.layout_of(arg.expect_ty()).is_1zst()) =>
{
build_pointer_or_reference_di_node(cx, t, t.expect_boxed_ty(), unique_type_id)
}