diff options
| author | est31 <MTest31@outlook.com> | 2022-02-19 00:48:49 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-02-19 17:27:43 +0100 |
| commit | 2ef8af66196f7cc270a0532ea989f2fc6bc6885d (patch) | |
| tree | e023e65e895d79575848f47b3d00129f9c5a9f0f /compiler/rustc_middle/src/ty/print | |
| parent | b8c56fa8c30821129b0960180f528d4a1a4f9316 (diff) | |
| download | rust-2ef8af66196f7cc270a0532ea989f2fc6bc6885d.tar.gz rust-2ef8af66196f7cc270a0532ea989f2fc6bc6885d.zip | |
Adopt let else in more places
Diffstat (limited to 'compiler/rustc_middle/src/ty/print')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index ae838a46157..a111a695f36 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -415,9 +415,8 @@ pub trait PrettyPrinter<'tcx>: cur_def_key = self.tcx().def_key(parent); } - let visible_parent = match visible_parent_map.get(&def_id).cloned() { - Some(parent) => parent, - None => return Ok((self, false)), + let Some(visible_parent) = visible_parent_map.get(&def_id).cloned() else { + return Ok((self, false)); }; let actual_parent = self.tcx().parent(def_id); |
