mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-30 16:39:26 +00:00
eb3970285b
In order to switch `clippy::uninlined_format_args` from pedantic to style, all existing tests must not raise a warning. I did not want to change the actual tests, so this is a relatively minor change that: * add `#![allow(clippy::uninlined_format_args)]` where needed * normalizes all allow/deny/warn attributes * all allow attributes are grouped together * sorted alphabetically * the `clippy::*` attributes are listed separate from the other ones. * deny and warn attributes are listed before the allowed ones changelog: none
26 lines
890 B
Text
26 lines
890 B
Text
error: using `Option.and_then(Some)`, which is a no-op
|
|
--> $DIR/bind_instead_of_map.rs:9:13
|
|
|
|
|
LL | let _ = x.and_then(Some);
|
|
| ^^^^^^^^^^^^^^^^ help: use the expression directly: `x`
|
|
|
|
|
note: the lint level is defined here
|
|
--> $DIR/bind_instead_of_map.rs:2:9
|
|
|
|
|
LL | #![deny(clippy::bind_instead_of_map)]
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
|
|
--> $DIR/bind_instead_of_map.rs:10:13
|
|
|
|
|
LL | let _ = x.and_then(|o| Some(o + 1));
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `x.map(|o| o + 1)`
|
|
|
|
error: using `Result.and_then(Ok)`, which is a no-op
|
|
--> $DIR/bind_instead_of_map.rs:16:13
|
|
|
|
|
LL | let _ = x.and_then(Ok);
|
|
| ^^^^^^^^^^^^^^ help: use the expression directly: `x`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|