Avoid unnecessary allocation.
This commit is contained in:
parent
c1d0f0a65c
commit
1d4972e0e9
@ -150,8 +150,8 @@ fn struct_llfields<'a, 'tcx>(
|
||||
} else {
|
||||
debug!("struct_llfields: offset: {:?} stride: {:?}", offset, layout.size);
|
||||
}
|
||||
|
||||
(result, packed, padding_used.then_some(Box::new(field_remapping)))
|
||||
let field_remapping = if padding_used { Some(Box::new(field_remapping)) } else { None };
|
||||
(result, packed, field_remapping)
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> CodegenCx<'a, 'tcx> {
|
||||
|
Loading…
Reference in New Issue
Block a user