Skip to content

build.rs: replace manual Option::filter with .filter() - #1667

Open
tangaac wants to merge 2 commits into
bytecodealliance:mainfrom
tangaac:fix/manual-filter-lint
Open

build.rs: replace manual Option::filter with .filter()#1667
tangaac wants to merge 2 commits into
bytecodealliance:mainfrom
tangaac:fix/manual-filter-lint

Conversation

@tangaac

@tangaac tangaac commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Newer clippy versions flag and_then(|x| if cond { None } else { Some(x) })
with the manual_filter lint. With -D warnings in CI, this breaks the
build on newer toolchains.

Replace with .filter(|x| !cond) in build.rs.

Verification

cargo clippy --workspace --features=all-apis -- -D warnings passes.

Newer clippy flags `and_then(|x| if cond { None } else { Some(x) })` as
`manual_filter`. Replace with `.filter(|x| !cond)` to satisfy
`-D warnings`.
@xtqqczze

Copy link
Copy Markdown
Contributor

The lint fixed is manual_filter.

@xtqqczze

This comment was marked as outdated.

@tangaac
tangaac force-pushed the fix/manual-filter-lint branch from e4e9635 to 53d434f Compare September 1, 2026 10:10
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