From 3dfacc1538f655d33c5c8037b14669149bcd81cd Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 19 May 2024 12:19:57 -0700 Subject: [PATCH] Ignore manual_map clippy lint For generic functions which are instantiated a lot, we can generate less LLVM IR and compile faster by handrolling Option::map. warning: manual implementation of `Option::map` --> src/punctuated.rs:1092:15 | 1092 | last: match punctuated.last { | _______________^ 1093 | | Some(t) => Some(Box::new(f(fold, *t))), 1094 | | None => None, 1095 | | }, | |_________^ help: try: `punctuated.last.map(|t| Box::new(f(fold, *t)))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map = note: `-W clippy::manual-map` implied by `-W clippy::all` = help: to override `-W clippy::all` add `#[allow(clippy::manual_map)]` --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index d74b08c822..20fd54ec89 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -274,6 +274,7 @@ clippy::let_underscore_untyped, // https://github.com/rust-lang/rust-clippy/issues/10410 clippy::manual_assert, clippy::manual_let_else, + clippy::manual_map, clippy::match_like_matches_macro, clippy::match_on_vec_items, clippy::match_same_arms,