Skip to content

Clean up for clippy 1.100 - #380

Open
iandriver wants to merge 1 commit into
scverse:mainfrom
iandriver:fix/clippy-1.100-lints
Open

iandriver wants to merge 1 commit into
scverse:mainfrom
iandriver:fix/clippy-1.100-lints

Conversation

@iandriver

Copy link
Copy Markdown
Contributor

What changed

Clippy 1.100 (rustc 1.100.0, the current stable on CI) fails cargo clippy --all-targets -- -D warnings on main with three errors:

  • clippy::duplicated_attributes: #[allow(clippy::too_many_arguments)] appears twice on build_paired_records and build_half_mapped_records in src/io/sam.rs. One copy of each is removed.
  • clippy::needless_range_loop: the loop in src/chimeric/bam.rs that finds the first mate gap in t.canon_sj. It now uses iter().position(...). The result is the same: the first mate gap gives 2 mates and its index, and no gap gives 1 mate and n_ex - 1.

No behaviour change.

Why

Every open PR fails the Clippy check until main is clean under the new toolchain, including #378 (Dependabot) and #379.

Checked

  • cargo +1.100.0 clippy --all-targets -- -D warnings passes.
  • cargo fmt --check passes.
  • cargo test: 813 passed, 0 failed.
  • Merges cleanly with CellReads.stats values as STARsolo writes them #379. With both applied, clippy 1.100 flags nothing else on that branch.

🤖 Generated with Claude Code

Clippy 1.100 (rustc 1.100.0, now on CI's stable) adds two lints that fail
`cargo clippy --all-targets -- -D warnings` on main: duplicated
`#[allow(clippy::too_many_arguments)]` on two SAM record builders, and a
range loop indexing `canon_sj` in the chimeric BAM writer. Drop the
duplicates and find the mate gap with `position`; behaviour is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant