Skip to content

examples: Collapse nested ifs in tag_stripper - #689

Open
jfietz wants to merge 1 commit into
Serial-ATA:mainfrom
jfietz:style/collapse-nested-if-tag-stripper
Open

examples: Collapse nested ifs in tag_stripper#689
jfietz wants to merge 1 commit into
Serial-ATA:mainfrom
jfietz:style/collapse-nested-if-tag-stripper

Conversation

@jfietz

@jfietz jfietz commented Aug 5, 2026

Copy link
Copy Markdown

Following the cargo fmt/cargo clippy/cargo doc step in
CONTRIBUTING.md before opening a PR, the commandcargo clippy --all-targets fails on current stable (clippy 0.1.97) with two issues:

clippy::collapsible_if` errors in `examples/tag_stripper.rs`. Since let-chains
are available on the current MSRV (1.89, edition 2024), the nested conditions
collapse into a single `if`.

CI does not currently catch this, as it runs cargo clippy --all-features
without --all-targets, so the examples are never linted.

No behavioral change - a failure at any step still falls through to the
"Unexpected input" branch.

`cargo clippy --all-targets` fails on the latest stable toolchain with two
`clippy::collapsible_if` errors in this example. Now that let-chains are
available on the current MSRV (1.89, edition 2024), the conditions can be
collapsed into a single `if`.

No behavioral change - a failure at any step still falls through to the
"Unexpected input" branch.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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