Skip to content

fix: collapse nested if into match guard to resolve clippy::collapsible_match - #519

Closed
johanneskoester with Copilot wants to merge 2 commits into
release-please--branches--master--components--rust-htslibfrom
copilot/fix-with-copilot
Closed

fix: collapse nested if into match guard to resolve clippy::collapsible_match#519
johanneskoester with Copilot wants to merge 2 commits into
release-please--branches--master--components--rust-htslibfrom
copilot/fix-with-copilot

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

CI was failing due to a clippy::collapsible_match error (enforced via -D clippy::all) in src/bam/ext.rs.

Change

Collapsed the nested if inside the Cigar::HardClip match arm into a match guard:

// Before
Cigar::HardClip(len) => {
    if include_hard_clip {
        result += len;
    }
}

// After
Cigar::HardClip(len) if include_hard_clip => {
    result += len;
}

…le_match

Co-authored-by: johanneskoester <1858646+johanneskoester@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with Copilot workflow fix: collapse nested if into match guard to resolve clippy::collapsible_match Aug 13, 2026
Copilot AI requested a review from johanneskoester August 13, 2026 20:12
Copilot stopped work on behalf of johanneskoester due to an error August 14, 2026 12:10
An error occurred while trying to automatically change base from release-please--branches--master--components--rust-htslib to master August 16, 2026 04:06
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.

2 participants