From c10adbc25e730ff1a94315c9e11927274c303997 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 25 Feb 2021 20:44:30 -0800 Subject: [PATCH] Ignore manual_map clippy lint 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 --- impl/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/impl/src/lib.rs b/impl/src/lib.rs index b0d4618..f0577d4 100644 --- a/impl/src/lib.rs +++ b/impl/src/lib.rs @@ -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,