Skip to content

Commit

Permalink
Ignore incorrect suggestion from manual_map lint
Browse files Browse the repository at this point in the history
rust-lang/rust-clippy#6795

    error: manual implementation of `Option::map`
        --> src/item.rs:1194:22
         |
    1194 |               let ty = if let Some(eq_token) = input.parse()? {
         |  ______________________^
    1195 | |                 Some((eq_token, input.parse::<Type>()?))
    1196 | |             } else {
    1197 | |                 None
    1198 | |             };
         | |_____________^ help: try this: `input.parse()?.map(|eq_token| (eq_token, input.parse::<Type>()?))`
         |
         = note: `-D clippy::manual-map` implied by `-D clippy::all`
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
  • Loading branch information
dtolnay committed Feb 26, 2021
1 parent 799c21b commit 0bd6d57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@
clippy::eval_order_dependence,
clippy::inherent_to_string,
clippy::large_enum_variant,
clippy::manual_map, // https://github.com/rust-lang/rust-clippy/issues/6795
clippy::match_on_vec_items,
clippy::missing_panics_doc,
clippy::needless_doctest_main,
Expand Down

0 comments on commit 0bd6d57

Please sign in to comment.