1
Fork 0

make up your mind, rustfmt

This commit is contained in:
Nathan Stocks 2022-10-10 10:06:44 -06:00
parent 50e2795624
commit 5ef1c03bd8

View file

@ -58,11 +58,7 @@ fn collect_item(tcx: TyCtxt<'_>, items: &mut DiagnosticItems, name: Symbol, item
/// Extract the first `rustc_diagnostic_item = "$name"` out of a list of attributes.
fn extract(attrs: &[ast::Attribute]) -> Option<Symbol> {
attrs.iter().find_map(|attr| {
if attr.has_name(sym::rustc_diagnostic_item) {
attr.value_str()
} else {
None
}
if attr.has_name(sym::rustc_diagnostic_item) { attr.value_str() } else { None }
})
}