diff options
| author | LingMan <LingMan@users.noreply.github.com> | 2020-11-23 04:58:21 +0100 |
|---|---|---|
| committer | LingMan <LingMan@users.noreply.github.com> | 2020-11-23 04:58:21 +0100 |
| commit | cd8973250dff50a2b71641659baa36c70ab3d57e (patch) | |
| tree | 2adf9688ee8e2532d300eecc6a44aac1053ba798 /compiler/rustc_codegen_llvm/src | |
| parent | c643dd2ec8fed2852f5eee8f776d657293a6a8f2 (diff) | |
| download | rust-cd8973250dff50a2b71641659baa36c70ab3d57e.tar.gz rust-cd8973250dff50a2b71641659baa36c70ab3d57e.zip | |
Use Option::map instead of open coding it
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs index 5e8ff14f0aa..96484034da7 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/metadata.rs @@ -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, ) |
