Skip to content

Commit 45164de

Browse files
committed
result_unit_err: Fix typo
1 parent 0552852 commit 45164de

File tree

3 files changed

+20
-20
lines changed

3 files changed

+20
-20
lines changed

clippy_lints/src/functions/result_unit_err.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ fn check_result_unit_err(cx: &LateContext<'_>, decl: &hir::FnDecl<'_>, item_span
5757
cx,
5858
RESULT_UNIT_ERR,
5959
fn_header_span,
60-
"this returns a `Result<_, ()>",
60+
"this returns a `Result<_, ()>`",
6161
None,
62-
"use a custom Error type instead",
62+
"use a custom `Error` type instead",
6363
);
6464
}
6565
}

tests/ui/len_without_is_empty.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,38 +86,38 @@ LL | pub fn is_empty(&self) -> Option<bool> {
8686
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8787
= note: expected signature: `(&self) -> bool` or `(&self) -> Result<bool>
8888

89-
error: this returns a `Result<_, ()>
89+
error: this returns a `Result<_, ()>`
9090
--> $DIR/len_without_is_empty.rs:230:5
9191
|
9292
LL | pub fn len(&self) -> Result<usize, ()> {
9393
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9494
|
9595
= note: `-D clippy::result-unit-err` implied by `-D warnings`
96-
= help: use a custom Error type instead
96+
= help: use a custom `Error` type instead
9797

98-
error: this returns a `Result<_, ()>
98+
error: this returns a `Result<_, ()>`
9999
--> $DIR/len_without_is_empty.rs:242:5
100100
|
101101
LL | pub fn len(&self) -> Result<usize, ()> {
102102
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103103
|
104-
= help: use a custom Error type instead
104+
= help: use a custom `Error` type instead
105105

106-
error: this returns a `Result<_, ()>
106+
error: this returns a `Result<_, ()>`
107107
--> $DIR/len_without_is_empty.rs:246:5
108108
|
109109
LL | pub fn is_empty(&self) -> Result<bool, ()> {
110110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111111
|
112-
= help: use a custom Error type instead
112+
= help: use a custom `Error` type instead
113113

114-
error: this returns a `Result<_, ()>
114+
error: this returns a `Result<_, ()>`
115115
--> $DIR/len_without_is_empty.rs:253:5
116116
|
117117
LL | pub fn len(&self) -> Result<usize, ()> {
118118
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119119
|
120-
= help: use a custom Error type instead
120+
= help: use a custom `Error` type instead
121121

122122
error: aborting due to 12 previous errors
123123

tests/ui/result_unit_error.stderr

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
1-
error: this returns a `Result<_, ()>
1+
error: this returns a `Result<_, ()>`
22
--> $DIR/result_unit_error.rs:3:1
33
|
44
LL | pub fn returns_unit_error() -> Result<u32, ()> {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `-D clippy::result-unit-err` implied by `-D warnings`
8-
= help: use a custom Error type instead
8+
= help: use a custom `Error` type instead
99

10-
error: this returns a `Result<_, ()>
10+
error: this returns a `Result<_, ()>`
1111
--> $DIR/result_unit_error.rs:12:5
1212
|
1313
LL | fn get_that_error(&self) -> Result<bool, ()>;
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1515
|
16-
= help: use a custom Error type instead
16+
= help: use a custom `Error` type instead
1717

18-
error: this returns a `Result<_, ()>
18+
error: this returns a `Result<_, ()>`
1919
--> $DIR/result_unit_error.rs:14:5
2020
|
2121
LL | fn get_this_one_too(&self) -> Result<bool, ()> {
2222
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2323
|
24-
= help: use a custom Error type instead
24+
= help: use a custom `Error` type instead
2525

26-
error: this returns a `Result<_, ()>
26+
error: this returns a `Result<_, ()>`
2727
--> $DIR/result_unit_error.rs:32:5
2828
|
2929
LL | pub fn unit_error(&self) -> Result<usize, ()> {
3030
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3131
|
32-
= help: use a custom Error type instead
32+
= help: use a custom `Error` type instead
3333

34-
error: this returns a `Result<_, ()>
34+
error: this returns a `Result<_, ()>`
3535
--> $DIR/result_unit_error.rs:41:5
3636
|
3737
LL | pub fn should_lint() -> ResInv<(), usize> {
3838
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3939
|
40-
= help: use a custom Error type instead
40+
= help: use a custom `Error` type instead
4141

4242
error: aborting due to 5 previous errors
4343

0 commit comments

Comments
 (0)