-
Notifications
You must be signed in to change notification settings - Fork 62
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
Configure CI including clippy #27
Conversation
|
Good to see you bro! Will re-spin with just the acks. |
Yes it does. How we solve this will effect how I proceed with this PR. If we don't want to enforce clippy in CI then I can move all the clippy fixes to a separate PR and just do an "add github actions" PR. I've done #42 to mimize the scrope, the clippy stuff can come later. |
f80aa90
to
38afbed
Compare
@@ -0,0 +1 @@ | |||
msrv = "1.41.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm interested what this does exactly.
utACK 38afbed It's rebased on the github ci changes right? So I guess if you unmark it as draft, it will run CI and I can merge it :) Thanks! |
Ah I did the original work with clippy configured for 1.41.1 so I can't guarantee that all the changes are sound and correct for Rust 1.29 and I was too lazy to go back over them all, thought I'd just wait till we moved the MSRV since its in the pipeline already. |
Add a `clippy.toml` configuration file using the current MSRV of 1.41.1
Clippy emits: warning: constants have by default a `'static` lifetime We have edition 2018 now so we do not need the explicit static lifetime.
clippy emits: warning: operator precedence can trip the unwary As suggested, add parenthesis to make the operator precedence explicit.
Clippy emits: warning: casting a character literal to `u8` truncates As suggested, use byte literal instead of a cast.
Clippy emits a few warnings of form: warning: this expression creates a reference which is immediately dereferenced by the compiler Remove unneeded references.
Clippy emits: warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) As suggested, remove explicit lifetime.
Clippy emits: warning: unneeded `return` statement As suggested, remove the unneeded return statement.
Clippy emits warning: length comparison to zero As suggested, use `is_empty`.
Clippy emits: warning: useless use of `vec!` As suggested, remove the useless call to `vec!` and use the slice directly.
Clippy emits: warning: this lifetime isn't used in the impl Remove unused lifetime.
Building the docs throws a warning: warning: this URL is not a hyperlink As suggested, use a hyperlink.
38afbed
to
a083faf
Compare
Do you want this @stevenroose? If not please close - I'm not fussed either way. Thanks |
If you rebase it, I think I'd ack it :) I'd have to re-review. |
No worries, I'll come back to it. |
Do some non-controversial clippy fixes. PR is now just the patches that were a firm ack below.