librustdoc: adopt let else in more places
This commit is contained in:
parent
65f6d33b77
commit
565f644edf
16 changed files with 51 additions and 95 deletions
|
@ -57,10 +57,8 @@ crate fn krate(cx: &mut DocContext<'_>) -> Crate {
|
|||
let primitives = local_crate.primitives(cx.tcx);
|
||||
let keywords = local_crate.keywords(cx.tcx);
|
||||
{
|
||||
let m = match *module.kind {
|
||||
ItemKind::ModuleItem(ref mut m) => m,
|
||||
_ => unreachable!(),
|
||||
};
|
||||
let ItemKind::ModuleItem(ref mut m) = *module.kind
|
||||
else { unreachable!() };
|
||||
m.items.extend(primitives.iter().map(|&(def_id, prim)| {
|
||||
Item::from_def_id_and_parts(
|
||||
def_id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue