-
Notifications
You must be signed in to change notification settings - Fork 9
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
Triage the list of allowed lints, addressing most of them. #14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In no particular order, these are the suspicious and/or not-entirely-addressed lints:
clippy::single_match_else
: permanently#![allow(…)]
ed, as the style it denies is important for readabilityclippy::string_add
: permanently#![allow(…)]
ed, as it's (IMO) misguided (and perhaps buggy?)(...: String) + "..."
is short for{ let mut s = ...; s.push_str("..."); s }
, not something elseclippy::match_same_arms
:#[allow(…)]
moved to specificmatch
es where listing out the patterns individually is more important than what the actual values are (i.e. grouping by the output values is detrimental)clippy::should_implement_trait
:#![allow(…)]
moved to specific module encountering this bug:clippy::unused_self
:#[allow(…)]
moved to specificimpl
(whereself
may be used in the future)clippy::redundant_closure_call
:#[allow(…)]
moved to specific macro using a closure as atry {...}
blockclippy::map_err_ignore
: had to be worked around because themap_err(|_|
it complains about have no information in the error, i.e. thoseResult
s might as well be a newtypedOption
clippy::nonminimal_bool
: had to be worked around by introducing extraif
s (which should make the logic clearer)nonminimal_bool
could be a real hazard, if it suggests e.g. rewriting!(foo && foo_bar)
into!foo || !foo_bar
, when the point of the&&
is to group afoo_bar
check with itsfoo
prerequisite(in fact, I need to comb through Rust-GPU looking for artifacts of this lint, because I've seen in the past conditions that were rendered unreadable by an outer
!
being De Morgan'd into a&&
, where the outer!
may have just been coincidental from e.g. aretain
/filter
predicate's keep/remove distinction, but with||
the correlation between the two sides was erased...)Fixes #13
cc @Jake-Shadle (this arguably counts as feedback for Embark's list of lints)