Skip to content

chore(lexical/query): fix clippy 1.97 question_mark lint in next_block_boundary (#851)#852

Merged
mosuka merged 1 commit into
mainfrom
chore/clippy-197-question-mark
Jul 10, 2026
Merged

chore(lexical/query): fix clippy 1.97 question_mark lint in next_block_boundary (#851)#852
mosuka merged 1 commit into
mainfrom
chore/clippy-197-question-mark

Conversation

@mosuka

@mosuka mosuka commented Jul 9, 2026

Copy link
Copy Markdown
Owner

Summary

Rust 1.97.0 (on the CI runners since 2026-07-09) broadened clippy::question_mark, which now fires on the match-with-early-None in BooleanScorer::next_block_boundary (laurus/src/lexical/query/scorer.rs:961) and fails every clippy gate repo-wide. First seen on PR #850's Test laurus-wasm job; the repo-level Clippy job passed there only because it still resolved the previous stable at run time.

One-line-class fix: replace the match with the ? operator, exactly as clippy suggests. Behavior-identical — the early None return is preserved, so the conservative "any clause without block info disables the skip" semantics are unchanged.

Testing

  • cargo +1.97.0 clippy --workspace --all-targets --features laurus/embeddings-all -- -D warnings — clean
  • cargo +1.97.0 clippy -p laurus-wasm --target wasm32-unknown-unknown -- -D warnings — clean (reproduces the CI failure before the fix)
  • cargo fmt --check clean; boolean scorer tests 36/36 green

Closes #851

…k_boundary (#851)

Rust 1.97.0's broadened clippy::question_mark lint fires on the
match-with-early-None in BooleanScorer::next_block_boundary, failing
every CI clippy gate. Replace it with the ? operator as clippy
suggests; behavior is identical (early None return preserved).
@mosuka mosuka merged commit 3977349 into main Jul 10, 2026
22 checks passed
@mosuka mosuka deleted the chore/clippy-197-question-mark branch July 10, 2026 14:28
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.

Fix clippy 1.97 question_mark lint breaking CI (scorer.rs next_block_boundary)

1 participant