Skip to content

Commit

Permalink
Ignore let_and_return clippy lint
Browse files Browse the repository at this point in the history
    warning: returning the result of a `let` binding from a block
      --> flags/src/impl.rs:14:5
       |
    3  |     let mut flag = "c++11";
       |     ----------------------- unnecessary `let` binding
    ...
    14 |     flag
       |     ^^^^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
       = note: `-W clippy::let-and-return` implied by `-W clippy::all`
       = help: to override `-W clippy::all` add `#[allow(clippy::let_and_return)]`
    help: return the expression directly
       |
    3  ~
    4  |
     ...
    13 |
    14 ~     ("c++11") as _
       |
  • Loading branch information
dtolnay committed Mar 6, 2024
1 parent fe8fdca commit afb4d75
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flags/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//! This crate is an implementation detail of the `cxx` and `cxx-build` crates,
//! and does not expose any public API.
#![allow(clippy::let_and_return)]

mod r#impl;

#[doc(hidden)]
Expand Down

0 comments on commit afb4d75

Please sign in to comment.