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

lib: #![allow(clippy::needless_borrow)] #237

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

cgwalters
Copy link
Collaborator

In my experience this is far and away the clippy lint that is:

  • Most common to trigger (especially when refactoring code)
  • The least valuable to fix; there's no performance or correctness concerns really

@cgwalters cgwalters mentioned this pull request Dec 19, 2023
@jeckersb
Copy link
Contributor

There's also clippy::needless_borrows_for_generic_args which is similar and also has an instance fixed by #236, so we might want to include both.

@cgwalters
Copy link
Collaborator Author

There's also clippy::needless_borrows_for_generic_args which is similar and also has an instance fixed by #236, so we might want to include both.

Makes sense probably to add (as a followup to not rerun CI I think), but I don't think you're correct that there is an instance in that PR.

@jeckersb
Copy link
Contributor

There's also clippy::needless_borrows_for_generic_args which is similar and also has an instance fixed by #236, so we might want to include both.

Makes sense probably to add (as a followup to not rerun CI I think), but I don't think you're correct that there is an instance in that PR.

It's this one:

error: the borrowed expression implements the required traits
  --> lib/src/mount.rs:28:23
   |
28 |     let o = Task::new(&desc, "findmnt")
   |                       ^^^^^ help: change this to: `desc`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `-D clippy::needless-borrows-for-generic-args` implied by `-D clippy::style`
   = help: to override `-D clippy::style` add `#[allow(clippy::needless_borrows_for_generic_args)]`

@cgwalters
Copy link
Collaborator Author

Ahh I figured it out, I was on 1.73, it looks like in 1.74 they split this lint into two.

In my experience this is far and away the clippy lint that is:

- Most common to trigger (especially when refactoring code)
- The least valuable to fix; there's no performance or correctness
  concerns really

Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters
Copy link
Collaborator Author

Ahh I figured it out, I was on 1.73, it looks like in 1.74 they split this lint into two.

Stuff like this BTW is another reason not to hard block on "style" clippy lints; requiring every contributor to match the exact Rust version run in CI for clippy in the general case gets annoying.

@cgwalters cgwalters merged commit 38fc67a into containers:main Dec 19, 2023
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants