From 29719a3b90d87bed5c747bfb0815af34d0d65fa7 Mon Sep 17 00:00:00 2001 From: Minoru OSUKA Date: Thu, 9 Jul 2026 23:37:23 +0900 Subject: [PATCH] chore(lexical/query): fix clippy 1.97 question_mark lint in next_block_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). --- laurus/src/lexical/query/scorer.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/laurus/src/lexical/query/scorer.rs b/laurus/src/lexical/query/scorer.rs index 4605a341..6e747317 100644 --- a/laurus/src/lexical/query/scorer.rs +++ b/laurus/src/lexical/query/scorer.rs @@ -958,15 +958,11 @@ impl Scorer for BooleanScorer { let clauses = self.clauses.borrow(); let mut min_boundary: Option = None; for (scorer, _) in clauses.iter() { - match scorer.next_block_boundary(doc_id) { - None => return None, - Some(b) => { - min_boundary = Some(match min_boundary { - None => b, - Some(m) => m.min(b), - }); - } - } + let b = scorer.next_block_boundary(doc_id)?; + min_boundary = Some(match min_boundary { + None => b, + Some(m) => m.min(b), + }); } min_boundary }