clippy lints#251
Conversation
|
Filed an issue in Clippy reporting the broken lint: rust-lang/rust-clippy#16897 |
| @@ -7,7 +7,7 @@ license = "MPL-2.0" | |||
| # Report a specific error in the case that the toolchain is too old for | |||
| # let-else: | |||
There was a problem hiding this comment.
Suggest this comment is removed, or updated to explain what it is in 1.70.0 that we depend on.
There was a problem hiding this comment.
Good call out. I want to bump the MSRV in a subsequent PR, which'll allow us to use edition 2024 and get some nice additional Clippy-driven syntax cleanups.
There was a problem hiding this comment.
I agree we should either remove or update the comment if we're changing the version.
| || relpath.starts_with("kernel") | ||
| || relpath == PathBuf::from("usr") | ||
| || relpath == PathBuf::from("usr/share") | ||
| || *relpath == *"usr" |
There was a problem hiding this comment.
How about the more natural
relpath == Path::new("usr")
instead of the double deref?
There was a problem hiding this comment.
They aren't the same types but they do deref to the same types, i.e. a direct comparison wouldn't typecheck.
I misread your suggestion. Also, the previous usage of PathBuf (as opposed to Path) was what wound up triggering the bug in Clippy in the first place.
|
If you fix the comment thing, and then either do or resolve Andy's other feedback, then it looks good from my perspective! |
|
Fixed the comment thing, and responded to Andy's other feedback. |
Noticed clippy was spewing lints but unable to fix them. For some reason the
cmp_ownedlint results in non-compileable code. After manually fixing those four locations and integrating @jclulow's suggestions from now-cancelled #249 this PR results.