Use clippy in CI? #158
Labels
enhancement
New feature or request
help wanted
Extra attention is needed
question
Further information is requested
Hi @BurntSushi. I figured I'd open an issue to ask before putting up a PR. Are you interested in running clippy on this crate as part of CI?
Clippy reports 44 warnings and 2 hard errors on
bstr
currently. At a first glance, most of the warnings looked like good simplifications of either thestd
APIs called (e.g. swappings.get(0)
fors.first()
) or the code itself (removing unnecessary lifetime annotations, usingfor x in iter
instead ofwhile let Some(x) = iter.next()
, removing needless borrows, etc.).The hard errors both revolve around deriving
Hash
when manually implementingPartialEq
.If you're open to it, I can put up a PR that fixes each clippy warning type in an isolated commit so you can see which lints you like and which ones you don't. I know for my own crates, I like being able to tailor clippy to my tastes.
The text was updated successfully, but these errors were encountered: