Skip to content

Commit ba7a01a

Browse files
committed
double-comparisons: make lint adhere to lint message convention
1 parent 6b0a6a7 commit ba7a01a

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

clippy_lints/src/double_comparison.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl<'tcx> DoubleComparisons {
6060
cx,
6161
DOUBLE_COMPARISONS,
6262
span,
63-
"This binary expression can be simplified",
63+
"this binary expression can be simplified",
6464
"try",
6565
sugg,
6666
applicability,

tests/ui/double_comparison.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
1-
error: This binary expression can be simplified
1+
error: this binary expression can be simplified
22
--> $DIR/double_comparison.rs:6:8
33
|
44
LL | if x == y || x < y {
55
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
66
|
77
= note: `-D clippy::double-comparisons` implied by `-D warnings`
88

9-
error: This binary expression can be simplified
9+
error: this binary expression can be simplified
1010
--> $DIR/double_comparison.rs:9:8
1111
|
1212
LL | if x < y || x == y {
1313
| ^^^^^^^^^^^^^^^ help: try: `x <= y`
1414

15-
error: This binary expression can be simplified
15+
error: this binary expression can be simplified
1616
--> $DIR/double_comparison.rs:12:8
1717
|
1818
LL | if x == y || x > y {
1919
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
2020

21-
error: This binary expression can be simplified
21+
error: this binary expression can be simplified
2222
--> $DIR/double_comparison.rs:15:8
2323
|
2424
LL | if x > y || x == y {
2525
| ^^^^^^^^^^^^^^^ help: try: `x >= y`
2626

27-
error: This binary expression can be simplified
27+
error: this binary expression can be simplified
2828
--> $DIR/double_comparison.rs:18:8
2929
|
3030
LL | if x < y || x > y {
3131
| ^^^^^^^^^^^^^^ help: try: `x != y`
3232

33-
error: This binary expression can be simplified
33+
error: this binary expression can be simplified
3434
--> $DIR/double_comparison.rs:21:8
3535
|
3636
LL | if x > y || x < y {
3737
| ^^^^^^^^^^^^^^ help: try: `x != y`
3838

39-
error: This binary expression can be simplified
39+
error: this binary expression can be simplified
4040
--> $DIR/double_comparison.rs:24:8
4141
|
4242
LL | if x <= y && x >= y {
4343
| ^^^^^^^^^^^^^^^^ help: try: `x == y`
4444

45-
error: This binary expression can be simplified
45+
error: this binary expression can be simplified
4646
--> $DIR/double_comparison.rs:27:8
4747
|
4848
LL | if x >= y && x <= y {

0 commit comments

Comments
 (0)