Skip to content

Commit 82babe0

Browse files
committed
Don't sort span_suggestions, leave that to caller
1 parent 8c6c542 commit 82babe0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clippy_lints/src/booleans.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,9 @@ impl<'a, 'tcx> NonminimalBoolVisitor<'a, 'tcx> {
424424
improvements.push(suggestion);
425425
}
426426
}
427-
let nonminimal_bool_lint = |suggestions: Vec<_>| {
427+
let nonminimal_bool_lint = |mut suggestions: Vec<_>| {
428428
if self.cx.tcx.lint_level_at_node(NONMINIMAL_BOOL, e.hir_id).0 != Level::Allow {
429+
suggestions.sort();
429430
span_lint_hir_and_then(
430431
self.cx,
431432
NONMINIMAL_BOOL,

0 commit comments

Comments
 (0)