Auto merge of #13929 - danieleades:simplify, r=lnicola

internal: a number of code simplifications
This commit is contained in:
bors 2023-01-11 09:38:34 +00:00
commit f32f64bffc
22 changed files with 161 additions and 202 deletions

View file

@ -212,7 +212,7 @@ fn expand_var(ctx: &mut ExpandCtx<'_>, v: &SmolStr, id: tt::TokenId) -> ExpandRe
} else {
ctx.bindings.get(v, &mut ctx.nesting).map_or_else(
|e| ExpandResult { value: Fragment::Tokens(tt::TokenTree::empty()), err: Some(e) },
|it| ExpandResult::ok(it),
ExpandResult::ok,
)
}
}