Skip to content

Commit 580f9a7

Browse files
committed
minor cleanups
1 parent 8914f41 commit 580f9a7

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

clippy_lints/src/missing_fields_in_debug.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ const HELP_FIELD_REFERENCE: &str = "the field referenced by this binding is unus
8888
const HELP_INCLUDE_ALL_FIELDS: &str = "consider including all fields in this `Debug` impl";
8989
const HELP_FINISH_NON_EXHAUSTIVE: &str = "consider calling `.finish_non_exhaustive()` if you intend to ignore fields";
9090

91-
fn report_lints<I>(cx: &LateContext<'_>, span: Span, span_notes: I)
92-
where
93-
I: Iterator<Item = (Span, &'static str)>,
94-
{
91+
fn report_lints(cx: &LateContext<'_>, span: Span, span_notes: Vec<(Span, &'static str)>) {
9592
span_lint_and_then(cx, MISSING_FIELDS_IN_DEBUG, span, WARN, |diag| {
9693
for (span, note) in span_notes {
9794
diag.span_note(span, note);
@@ -177,7 +174,7 @@ fn check_struct<'tcx>(
177174
.collect::<Vec<_>>();
178175

179176
if !span_notes.is_empty() {
180-
report_lints(cx, item.span, span_notes.into_iter());
177+
report_lints(cx, item.span, span_notes);
181178
}
182179
}
183180

@@ -250,7 +247,7 @@ fn check_enum<'tcx>(
250247
}
251248

252249
if !span_notes.is_empty() {
253-
report_lints(cx, item.span, span_notes.into_iter());
250+
report_lints(cx, item.span, span_notes);
254251
}
255252
}
256253

0 commit comments

Comments
 (0)