Skip to content

Commit c87dc6d

Browse files
committed
Running the formatter
1 parent 48c85c5 commit c87dc6d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

compiler/rustc_errors/src/json.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ impl Diagnostic {
319319
message: translated_message.to_string(),
320320
code: None,
321321
level: "help",
322-
spans: Self::filter_empty_spans_with_no_replacement(DiagnosticSpan::from_suggestion(sugg, &args, je)),
322+
spans: Self::filter_empty_spans_with_no_replacement(
323+
DiagnosticSpan::from_suggestion(sugg, &args, je),
324+
),
323325
children: vec![],
324326
rendered: None,
325327
}
@@ -373,8 +375,12 @@ impl Diagnostic {
373375
}
374376

375377
fn filter_empty_spans_with_no_replacement(spans: Vec<DiagnosticSpan>) -> Vec<DiagnosticSpan> {
376-
spans.into_iter()
377-
.filter(|span| !(span.byte_start == span.byte_end && span.suggested_replacement == Some(String::new())))
378+
spans
379+
.into_iter()
380+
.filter(|span| {
381+
!(span.byte_start == span.byte_end
382+
&& span.suggested_replacement == Some(String::new()))
383+
})
378384
.collect()
379385
}
380386

0 commit comments

Comments
 (0)