Skip to content

Commit

Permalink
make up your mind, rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
CleanCut committed Oct 10, 2022
1 parent 50e2795 commit 5ef1c03
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions compiler/rustc_passes/src/diagnostic_items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
})
}

Expand Down

0 comments on commit 5ef1c03

Please sign in to comment.