Skip to content

Commit 3dfacc1

Browse files
committed
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)]`
1 parent 7273aa7 commit 3dfacc1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@
274274
clippy::let_underscore_untyped, // https://github.com/rust-lang/rust-clippy/issues/10410
275275
clippy::manual_assert,
276276
clippy::manual_let_else,
277+
clippy::manual_map,
277278
clippy::match_like_matches_macro,
278279
clippy::match_on_vec_items,
279280
clippy::match_same_arms,

0 commit comments

Comments
 (0)