Fix more clippy warnings + run them in the CI#125
Open
sylvestre wants to merge 7 commits into
Open
Conversation
The rendered example wraps a full `fn main`, which trips clippy::needless_doctest_main on stable. Tag the block as rust,ignore so it stays syntax-highlighted without being executed as a doctest.
Wrap `machine()`/`processor()` and `x86_64` in backticks so they render as code in rustdoc and silence clippy::doc_markdown.
Combine "arm64" with the armv6l/armv7l/armv8l variants since they all map to "arm". Silences clippy::match_same_arms.
Add an `# Errors` section explaining when `new()` returns `PlatformInfoError`, satisfying clippy::missing_errors_doc.
Test the failure case (`result == -1`) first so the error path is the positive branch, satisfying clippy::if_not_else.
The three integration tests never produced an `Err`, so the `Result<(), String>` return type was dead weight. Switch them to plain `()` to silence clippy::unnecessary_wraps.
Add `-W clippy::pedantic` alongside `-D warnings` so the pedantic lint group fires in CI and any new pedantic violation fails the build.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #125 +/- ##
==========================================
- Coverage 93.78% 93.75% -0.04%
==========================================
Files 5 5
Lines 788 784 -4
==========================================
- Hits 739 735 -4
Misses 49 49
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cakebaker
reviewed
May 6, 2026
Contributor
There was a problem hiding this comment.
I would add a [lints.clippy] section to Cargo.toml and enable the pedantic lints there so you can omit -W clippy::pedantic here in this file.
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.
No description provided.