Fix clippy pedantic issues and activate it on CI by default#91
Open
brainstorm wants to merge 12 commits intomainfrom
Open
Fix clippy pedantic issues and activate it on CI by default#91brainstorm wants to merge 12 commits intomainfrom
brainstorm wants to merge 12 commits intomainfrom
Conversation
cargo clippy --features esp32c6 -- -W clippy::mem_forget_instead_of_drop -W clippy::holding_lock -W clippy::large_futures -W clippy::pedantic
cargo clippy --features esp32c6 -- -W clippy::mem_forget -W clippy::await_holding_lock -W clippy::large_futures -W clippy::pedantic Notice mem_forget and await_holding_lock, according to the currently available lints at the time of writing this: https://rust-lang.github.io/rust-clippy/master/index.html
…tps://github.com/j178/prek on our dev machines after this PR is merged, otherwise they'll be a fair bit of CI breakage and potential DX frustration
…e types instead of usize
…ines (according to clippy lints)... still needs a final pass of review
…onnection_loop function
This file contains hidden or 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.
large_futuresclippy lint... if we don't do that, heap blows up by ~20KB, which is unacceptable in our target(s). Happy to hear alternative solutions since I don't like to usealloc::functionality if it's not needed :-/connection_loopfunction body to 100 lines or less (another clippy pedantic lint) by extracting its handlers. This approach also gets closer to Traits refactor #85 where I had to do the similar extraction/simplification.asyncin some functions, overall and definitely needs on-hardware testing.