mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
47 lines
1.4 KiB
Text
47 lines
1.4 KiB
Text
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:11:12
|
|
|
|
|
LL | Ok(_) => {},
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
|
= note: `-D clippy::ignored-unit-patterns` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::ignored_unit_patterns)]`
|
|
|
|
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:12:13
|
|
|
|
|
LL | Err(_) => {},
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:14:15
|
|
|
|
|
LL | if let Ok(_) = foo() {}
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:16:28
|
|
|
|
|
LL | let _ = foo().map_err(|_| todo!());
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:22:16
|
|
|
|
|
LL | Ok(_) => {},
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:24:17
|
|
|
|
|
LL | Err(_) => {},
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
error: matching over `()` is more explicit
|
|
--> $DIR/ignored_unit_patterns.rs:36:9
|
|
|
|
|
LL | let _ = foo().unwrap();
|
|
| ^ help: use `()` instead of `_`: `()`
|
|
|
|
error: aborting due to 7 previous errors
|
|
|