Use Option::map instead of open coding it

This commit is contained in:
LingMan 2020-11-23 04:58:21 +01:00
parent c643dd2ec8
commit cd8973250d
3 changed files with 8 additions and 12 deletions

View file

@ -1152,10 +1152,7 @@ impl<'ll> MemberDescription<'ll> {
self.size.bits(),
self.align.bits() as u32,
self.offset.bits(),
match self.discriminant {
None => None,
Some(value) => Some(cx.const_u64(value)),
},
self.discriminant.map(|v| cx.const_u64(v)),
self.flags,
self.type_metadata,
)