Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emit rebinding only for interpolations that refer to a field #379

Merged
merged 4 commits into from
Nov 8, 2024

Commits on Nov 8, 2024

  1. Configuration menu
    Copy the full SHA
    8a77dea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f4d5c2a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3ee0a4d View commit details
    Browse the repository at this point in the history
  4. Resolve let_and_return clippy lint

        warning: returning the result of a `let` binding from a block
          --> impl/src/fmt.rs:67:21
           |
        63 | /                     let member = match int.parse::<u32>() {
        64 | |                         Ok(index) => MemberUnraw::Unnamed(Index { index, span }),
        65 | |                         Err(_) => return Ok(()),
        66 | |                     };
           | |______________________- unnecessary `let` binding
        67 |                       member
           |                       ^^^^^^
           |
           = 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
           |
        63 ~
        64 ~                     match int.parse::<u32>() {
        65 +                         Ok(index) => MemberUnraw::Unnamed(Index { index, span }),
        66 +                         Err(_) => return Ok(()),
        67 +                     }
           |
    dtolnay committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    fb59da6 View commit details
    Browse the repository at this point in the history