-
Notifications
You must be signed in to change notification settings - Fork 167
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
enable clippy for tower-http and fix current issues #407
base: main
Are you sure you want to change the base?
Conversation
Not sure why CI isn't running. I'll try closing and re-opening. |
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.
Changes look good to me, but I want to also wait for David's opinion of including Clippy in CI.
@@ -3,3 +3,4 @@ members = [ | |||
"tower-http", | |||
"examples/*", | |||
] | |||
resolver = "2" |
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.
Missing final newline. Also an unrelated change, so may be worth a separate commit (though I think David always squash-merges anyways..)
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.
this PR should be rebased
at least because resolver = "2" has been added to Cargo.toml meanwhile
so it would be easier to review for David when he will come here...
Probably, but the bigger issue is first to ensure maintainers want to merge this in to begin with
if he comes here, indeed
this PR should be rebased |
Probably, but the bigger issue is first to ensure maintainers want to merge this in to begin with. |
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.
The removal of dbg!
and some &
s as well as using a nested or pattern in a match arm and switching the allow()
ed clippy lint name where a previous lint was deprecated/replaced are all things I consider uncontroversial enough to merge. If you want to split the PR in two, I'm happy to merge that part.
@@ -211,7 +210,7 @@ | |||
nonstandard_style, | |||
missing_docs | |||
)] | |||
#![deny(unreachable_pub, private_in_public)] |
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 think this lint got replaced by smaller individual lints? Probably worth enabling those / some of them.
@@ -183,7 +183,6 @@ | |||
clippy::todo, | |||
clippy::empty_enum, | |||
clippy::enum_glob_use, | |||
clippy::pub_enum_variant_names, |
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.
Lint deprecated?
Took another look, happy to merge once feedback that has been posted so far (excl. splitting the PR) is adressed. David hasn't been active in quite a while. |
Motivation
I maintain a fork of
tower
, including alsotower-http
in https://github.com/plabayo/tower-async.Only now did I notice that tower-http does not yet enable clippy.
Nothing bad was spotted by enabling it, but still,
seems by now that the Rust community agrees that enabling clippy everywhere is useful?
So as such, here my first contribution upstream.
Solution
N/A