]> git.lizzy.rs Git - rust.git/commitdiff
make up your mind, rustfmt
authorNathan Stocks <cleancut@github.com>
Mon, 10 Oct 2022 16:06:44 +0000 (10:06 -0600)
committerNathan Stocks <cleancut@github.com>
Mon, 10 Oct 2022 16:06:52 +0000 (10:06 -0600)
compiler/rustc_passes/src/diagnostic_items.rs

index 2516226f36cbd8b4f5988a1d74c4b24da531cf20..3f991cf65724128814a1bf44879299b65f702a07 100644 (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 }
     })
 }