Skip to content

Commit

Permalink
Ignore map_clone clippy lint
Browse files Browse the repository at this point in the history
    warning: you are explicitly cloning with `.map()`
      --> gen/cmd/src/app.rs:72:32
       |
    72 |       let cxx_impl_annotations = matches
       |  ________________________________^
    73 | |         .get_one::<String>(CXX_IMPL_ANNOTATIONS)
    74 | |         .map(String::clone);
       | |___________________________^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
       = note: `-W clippy::map-clone` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add `#[allow(clippy::map_clone)]`
    help: consider calling the dedicated `cloned` method
       |
    72 ~     let cxx_impl_annotations = matches
    73 ~         .get_one::<String>(CXX_IMPL_ANNOTATIONS).cloned();
       |
  • Loading branch information
dtolnay committed Jan 12, 2024
1 parent 4a46306 commit c9c26d5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gen/cmd/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
clippy::into_iter_without_iter,
clippy::items_after_statements,
clippy::large_enum_variant,
clippy::map_clone,
clippy::match_bool,
clippy::match_on_vec_items,
clippy::match_same_arms,
Expand Down

0 comments on commit c9c26d5

Please sign in to comment.