enable clippy for tower-http and fix current issues#407
enable clippy for tower-http and fix current issues#407GlenDC wants to merge 1 commit intotower-rs:mainfrom
Conversation
|
Not sure why CI isn't running. I'll try closing and re-opening. |
jplatte
left a comment
There was a problem hiding this comment.
Changes look good to me, but I want to also wait for David's opinion of including Clippy in CI.
| "tower-http", | ||
| "examples/*", | ||
| ] | ||
| resolver = "2" No newline at end of file |
There was a problem hiding this comment.
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.
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.
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.
| nonstandard_style, | ||
| missing_docs | ||
| )] | ||
| #![deny(unreachable_pub, private_in_public)] |
There was a problem hiding this comment.
I think this lint got replaced by smaller individual lints? Probably worth enabling those / some of them.
| clippy::todo, | ||
| clippy::empty_enum, | ||
| clippy::enum_glob_use, | ||
| clippy::pub_enum_variant_names, |
|
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. |
|
Hey @GlenDC, do you plan to get back to this at all? |
Motivation
I maintain a fork of
tower, including alsotower-httpin 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