diff options
| author | est31 <MTest31@outlook.com> | 2022-02-19 00:43:47 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-03-04 10:33:29 +0100 |
| commit | 565f644edfb83c2e5bc082fea2bf7045639fb179 (patch) | |
| tree | 0204f6f143aa827475c7e83b7423ad7acd014391 /src/librustdoc/formats/renderer.rs | |
| parent | 65f6d33b775eddfc0128c04083bbf3beea360114 (diff) | |
| download | rust-565f644edfb83c2e5bc082fea2bf7045639fb179.tar.gz rust-565f644edfb83c2e5bc082fea2bf7045639fb179.zip | |
librustdoc: adopt let else in more places
Diffstat (limited to 'src/librustdoc/formats/renderer.rs')
| -rw-r--r-- | src/librustdoc/formats/renderer.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/librustdoc/formats/renderer.rs b/src/librustdoc/formats/renderer.rs index b7af8c9801f..81053042f67 100644 --- a/src/librustdoc/formats/renderer.rs +++ b/src/librustdoc/formats/renderer.rs @@ -77,10 +77,8 @@ crate fn run_format<'tcx, T: FormatRenderer<'tcx>>( prof.generic_activity_with_arg("render_mod_item", item.name.unwrap().to_string()); cx.mod_item_in(&item)?; - let module = match *item.kind { - clean::StrippedItem(box clean::ModuleItem(m)) | clean::ModuleItem(m) => m, - _ => unreachable!(), - }; + let (clean::StrippedItem(box clean::ModuleItem(module)) | clean::ModuleItem(module)) = *item.kind + else { unreachable!() }; for it in module.items { debug!("Adding {:?} to worklist", it.name); work.push((cx.make_child_renderer(), it)); |
