From 22a6c8c13fcb79674307f2f4c60e5cbe98c27b2b Mon Sep 17 00:00:00 2001 From: discord9 Date: Mon, 13 Apr 2026 11:29:47 +0800 Subject: [PATCH] chore: per gemini Signed-off-by: discord9 --- src/common/function/src/scalars/matches_term.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/function/src/scalars/matches_term.rs b/src/common/function/src/scalars/matches_term.rs index fe37210885..f714097000 100644 --- a/src/common/function/src/scalars/matches_term.rs +++ b/src/common/function/src/scalars/matches_term.rs @@ -345,16 +345,15 @@ impl MatchesTermFinder { let prev_ok = self.starts_with_other || boundary_ok(self.term_kind, prev, false); if prev_ok { + if self.term_kind == TermKind::HanContaining { + return true; + } + let next_pos = actual_pos + self.finder.needle().len(); let next = text[next_pos..].chars().next(); let next_ok = self.ends_with_other || boundary_ok(self.term_kind, next, false); - let match_ok = match self.term_kind { - TermKind::HanContaining => true, - _ => prev_ok && next_ok, - }; - - if match_ok { + if next_ok { return true; } }