1
Fork 0

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:
jfager 2014-11-29 16:41:21 -05:00
parent 6163581451
commit 232ffa039d
43 changed files with 880 additions and 1335 deletions

View file

@ -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;
}