Skip to content

Commit

Permalink
Ignore manual_map clippy lint
Browse files Browse the repository at this point in the history
I do not find that it makes the code clearer in this case, given the
related `if` branch right above.

    error: manual implementation of `Option::map`
       --> impl/src/ast.rs:145:16
        |
    145 |           } else if let Some(transparent) = &self.transparent {
        |  ________________^
    146 | |             Some(transparent.span)
    147 | |         } else {
    148 | |             None
    149 | |         }
        | |_________^ help: try this: `self.transparent.as_ref().map(|transparent| transparent.span)`
        |
        = 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 1b0a849 commit c10adbc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions impl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#![allow(
clippy::blocks_in_if_conditions,
clippy::cast_possible_truncation,
clippy::manual_map,
clippy::map_unwrap_or,
clippy::needless_pass_by_value,
clippy::option_if_let_else,
Expand Down

0 comments on commit c10adbc

Please sign in to comment.