Repository navigation
chore: fix clippy warnings from Rust 1.98 - #157
Merged
Merged
Conversation
Newer stable clippy flags 22 warnings across the lib and tests. CI does not fail on them yet, but they hide new warnings in local runs. No behavior change.
There was a problem hiding this comment.
🟢 Approval recommended
The Clippy-warning cleanup has no active review issues.
No open issues 🎉
What changed in this PR
This PR cleans up Clippy warnings across fiber processing code and tests, with no intended behavior changes.
Changes:
- Simplify initialization and optional-value handling in
fiber.rs. - Remove redundant iterator conversions, references, imports, and test setup patterns.
- Reword callable-span documentation to avoid unintended rustdoc formatting.
| File | Description |
|---|---|
tests/regression/qc.rs |
Remove an unnecessary explicit lifetime. |
tests/molecular_annotation.rs |
Use to_vec() to clone a slice. |
tests/input_bam.rs |
Initialize filters with struct update syntax. |
tests/fibertig_test.rs |
Remove a redundant .into_iter() call. |
tests/fiber_stream.rs |
Remove an unused trait import. |
src/utils/ma_io.rs |
Reword documentation to avoid block-quote formatting. |
src/subcommands/qc.rs |
Remove a redundant .into_iter() call. |
src/subcommands/predict_m6a.rs |
Iterate over a byte string for DNA bases. |
src/subcommands/center.rs |
Remove a redundant reference in formatting. |
src/fiber.rs |
Use tuple initialization and ? for optional chunk handling. |
Review effort: Balanced
Open
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.
Rust 1.98 stable clippy reports 22 warnings on main. None of them fail CI, but they hide new warnings in local runs.
letinitialization with a tuple fromif/else(fiber.rs).?in place of amatchthat returnsNone(fiber.rs)..into_iter()calls, and use a byte string (center.rs,qc.rs,predict_m6a.rs, tests).>=lines rustdoc read as block quotes (ma_io.rs).FiberFilterswith struct update syntax in tests (tests/input_bam.rs).No behavior change.
cargo clippy --all-targetsis clean and all 156 tests pass.