Replace some verbose match statements with their if let
equivalent.
No semantic changes, no enabling `if let` where it wasn't already enabled.
This commit is contained in:
parent
6163581451
commit
232ffa039d
43 changed files with 880 additions and 1335 deletions
|
@ -2200,12 +2200,9 @@ fn register_def(cx: &DocContext, def: def::Def) -> ast::DefId {
|
|||
None => return did
|
||||
};
|
||||
inline::record_extern_fqn(cx, did, kind);
|
||||
match kind {
|
||||
TypeTrait => {
|
||||
let t = inline::build_external_trait(cx, tcx, did);
|
||||
cx.external_traits.borrow_mut().as_mut().unwrap().insert(did, t);
|
||||
}
|
||||
_ => {}
|
||||
if let TypeTrait = kind {
|
||||
let t = inline::build_external_trait(cx, tcx, did);
|
||||
cx.external_traits.borrow_mut().as_mut().unwrap().insert(did, t);
|
||||
}
|
||||
return did;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue