Skip to content

Commit 48ee470

Browse files
committed
fix: actually use the Applicability
1 parent c3e4d2b commit 48ee470

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

clippy_lints/src/unit_types/let_unit_value.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, format_args: &FormatArgsStorag
117117
init.span,
118118
format!("();\n{}", reindent_multiline(&snip, false, indent_of(cx, local.span))),
119119
));
120-
diag.multipart_suggestion(
121-
"replace variable usages with `()`",
122-
suggestions,
123-
Applicability::MachineApplicable,
124-
);
120+
diag.multipart_suggestion("replace variable usages with `()`", suggestions, app);
125121
return;
126122
}
127123
}
@@ -132,7 +128,7 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, format_args: &FormatArgsStorag
132128
} else {
133129
"omit the `let` binding and replace variable usages with `()`"
134130
};
135-
diag.multipart_suggestion(message, suggestions, Applicability::MachineApplicable);
131+
diag.multipart_suggestion(message, suggestions, app);
136132
},
137133
);
138134
}

0 commit comments

Comments
 (0)