Skip to content

Commit 75c5586

Browse files
committed
Fixed spelling and indentation issues in neg_cmp_op_on_partial_ord related files.
1 parent cb2f719 commit 75c5586

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

clippy_lints/src/neg_cmp_op_on_partial_ord.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for NoNegCompOpForPartialOrd {
8484
cx.span_lint(
8585
NEG_CMP_OP_ON_PARTIAL_ORD,
8686
expr.span,
87-
"The use of negated comparision operators on partially orded\
88-
types produces code that is hard to read and refactor. Please\
89-
consider to use the partial_cmp() instead, to make it clear\
87+
"The use of negated comparision operators on partially orded \
88+
types produces code that is hard to read and refactor. Please \
89+
consider to use the `partial_cmp` instead, to make it clear \
9090
that the two values could be incomparable."
9191
)
9292
}

tests/ui/neg_cmp_op_on_partial_ord.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@ fn main() {
3232

3333
let _not_less = match a_value.partial_cmp(&another_value) {
3434
None | Some(Ordering::Greater) | Some(Ordering::Equal) => true,
35-
_ => false,
35+
_ => false,
3636
};
3737
let _not_less_or_equal = match a_value.partial_cmp(&another_value) {
3838
None | Some(Ordering::Greater) => true,
3939
_ => false,
4040
};
4141
let _not_greater = match a_value.partial_cmp(&another_value) {
4242
None | Some(Ordering::Less) | Some(Ordering::Equal) => true,
43-
_ => false,
43+
_ => false,
4444
};
4545
let _not_greater_or_equal = match a_value.partial_cmp(&another_value) {
4646
None | Some(Ordering::Less) => true,
47-
_ => false,
47+
_ => false,
4848
};
4949

5050

tests/ui/neg_cmp_op_on_partial_ord.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
error: The use of negated comparision operators on partially ordedtypes produces code that is hard to read and refactor. Pleaseconsider to use the partial_cmp() instead, to make it clearthat the two values could be incomparable.
1+
error: The use of negated comparision operators on partially orded types produces code that is hard to read and refactor. Please consider to use the `partial_cmp` instead, to make it clear that the two values could be incomparable.
22
--> $DIR/neg_cmp_op_on_partial_ord.rs:18:21
33
|
44
18 | let _not_less = !(a_value < another_value);
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D neg-cmp-op-on-partial-ord` implied by `-D warnings`
88

9-
error: The use of negated comparision operators on partially ordedtypes produces code that is hard to read and refactor. Pleaseconsider to use the partial_cmp() instead, to make it clearthat the two values could be incomparable.
9+
error: The use of negated comparision operators on partially orded types produces code that is hard to read and refactor. Please consider to use the `partial_cmp` instead, to make it clear that the two values could be incomparable.
1010
--> $DIR/neg_cmp_op_on_partial_ord.rs:21:30
1111
|
1212
21 | let _not_less_or_equal = !(a_value <= another_value);
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

15-
error: The use of negated comparision operators on partially ordedtypes produces code that is hard to read and refactor. Pleaseconsider to use the partial_cmp() instead, to make it clearthat the two values could be incomparable.
15+
error: The use of negated comparision operators on partially orded types produces code that is hard to read and refactor. Please consider to use the `partial_cmp` instead, to make it clear that the two values could be incomparable.
1616
--> $DIR/neg_cmp_op_on_partial_ord.rs:24:24
1717
|
1818
24 | let _not_greater = !(a_value > another_value);
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

21-
error: The use of negated comparision operators on partially ordedtypes produces code that is hard to read and refactor. Pleaseconsider to use the partial_cmp() instead, to make it clearthat the two values could be incomparable.
21+
error: The use of negated comparision operators on partially orded types produces code that is hard to read and refactor. Please consider to use the `partial_cmp` instead, to make it clear that the two values could be incomparable.
2222
--> $DIR/neg_cmp_op_on_partial_ord.rs:27:33
2323
|
2424
27 | let _not_greater_or_equal = !(a_value >= another_value);

0 commit comments

Comments
 (0)