Skip to content

Commit be3e695

Browse files
committed
if_not_else: make lint adhere to lint message convention
1 parent 605e027 commit be3e695

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

clippy_lints/src/if_not_else.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl EarlyLintPass for IfNotElse {
6060
cx,
6161
IF_NOT_ELSE,
6262
item.span,
63-
"Unnecessary boolean `not` operation",
63+
"unnecessary boolean `not` operation",
6464
None,
6565
"remove the `!` and swap the blocks of the `if`/`else`",
6666
);
@@ -70,7 +70,7 @@ impl EarlyLintPass for IfNotElse {
7070
cx,
7171
IF_NOT_ELSE,
7272
item.span,
73-
"Unnecessary `!=` operation",
73+
"unnecessary `!=` operation",
7474
None,
7575
"change to `==` and swap the blocks of the `if`/`else`",
7676
);

clippy_lints/src/use_self.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ declare_clippy_lint! {
5050
/// ```
5151
pub USE_SELF,
5252
nursery,
53-
"Unnecessary structure name repetition whereas `Self` is applicable"
53+
"unnecessary structure name repetition whereas `Self` is applicable"
5454
}
5555

5656
declare_lint_pass!(UseSelf => [USE_SELF]);

src/lintlist/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,7 @@ pub static ref ALL_LINTS: Vec<Lint> = vec![
24982498
Lint {
24992499
name: "use_self",
25002500
group: "nursery",
2501-
desc: "Unnecessary structure name repetition whereas `Self` is applicable",
2501+
desc: "unnecessary structure name repetition whereas `Self` is applicable",
25022502
deprecation: None,
25032503
module: "use_self",
25042504
},

tests/ui/if_not_else.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: Unnecessary boolean `not` operation
1+
error: unnecessary boolean `not` operation
22
--> $DIR/if_not_else.rs:9:5
33
|
44
LL | / if !bla() {
@@ -11,7 +11,7 @@ LL | | }
1111
= note: `-D clippy::if-not-else` implied by `-D warnings`
1212
= help: remove the `!` and swap the blocks of the `if`/`else`
1313

14-
error: Unnecessary `!=` operation
14+
error: unnecessary `!=` operation
1515
--> $DIR/if_not_else.rs:14:5
1616
|
1717
LL | / if 4 != 5 {

0 commit comments

Comments
 (0)