Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

fix(autoindex): satisfy clippy::manual_contains in query predicate eval

xerj-orgb8a9f9debdd8
diff --git a/engine/crates/xerj-autoindex/src/extract/code.rs b/engine/crates/xerj-autoindex/src/extract/code.rs
index a44d9345d..1febf1ae5 100644
--- a/engine/crates/xerj-autoindex/src/extract/code.rs
+++ b/engine/crates/xerj-autoindex/src/extract/code.rs
@@ -377,8 +377,8 @@ fn predicates_hold(query: &Query, m: &tree_sitter::QueryMatch, text: &str) -> bo
})
.collect();
match &*p.operator {
- "eq?" | "any-of?" => strings.iter().any(|s| *s == got),
- "not-eq?" | "not-any-of?" => !strings.iter().any(|s| *s == got),
+ "eq?" | "any-of?" => strings.contains(&got),
+ "not-eq?" | "not-any-of?" => !strings.contains(&got),
_ => false,
}
})