diff options
| author | Nathan Stocks <cleancut@github.com> | 2022-10-10 10:06:44 -0600 |
|---|---|---|
| committer | Nathan Stocks <cleancut@github.com> | 2022-10-10 10:06:52 -0600 |
| commit | 5ef1c03bd80e40b3280f15b8285b73d5fc616776 (patch) | |
| tree | fd077918a72c6a43c376c245ed7acbfcad1417af | |
| parent | 50e27956248a37c7b02c570967b9e0c51d289ea2 (diff) | |
| download | rust-5ef1c03bd80e40b3280f15b8285b73d5fc616776.tar.gz rust-5ef1c03bd80e40b3280f15b8285b73d5fc616776.zip | |
make up your mind, rustfmt
| -rw-r--r-- | compiler/rustc_passes/src/diagnostic_items.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_passes/src/diagnostic_items.rs b/compiler/rustc_passes/src/diagnostic_items.rs index 2516226f36c..3f991cf6572 100644 --- a/compiler/rustc_passes/src/diagnostic_items.rs +++ b/compiler/rustc_passes/src/diagnostic_items.rs @@ -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 } }) } |
