Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
Rust ai-nativedescription-logicsformal-verificationinfrastructure-as-codeisabelle-languageknowledge-graphleanlean4mcpmcp-serverontologyowlowl2reasoningrustshaclsparqltheorem-proving
fix: resolve clippy warnings in vecstore, embed, and structembed
FABIOTESS4ba34a2175c8
diff --git a/src/embed.rs b/src/embed.rsindex 24687bb3..8db05418 100644--- a/src/embed.rs+++ b/src/embed.rs@@ -15,6 +15,7 @@ pub const BGE_SMALL_TOKENIZER_URL: &str ="https://huggingface.co/BAAI/bge-small-en-v1.5/resolve/main/tokenizer.json";pub struct TextEmbedder {+ #[allow(clippy::type_complexity)]model: SimplePlan<TypedFact, Box<dyn TypedOp>, Graph<TypedFact, Box<dyn TypedOp>>>,tokenizer: Tokenizer,dim: usize,diff --git a/src/structembed.rs b/src/structembed.rsindex 16e303ba..7bb67400 100644--- a/src/structembed.rs+++ b/src/structembed.rs@@ -178,7 +178,7 @@ impl StructuralTrainer {for root in &roots {let root_emb = embeddings[root].clone();// Gradient: point toward origin (i.e., the embedding itself, pulling it back)- let grad_to_origin: Vec<f32> = root_emb.iter().map(|x| *x).collect();+ let grad_to_origin: Vec<f32> = root_emb.iter().copied().collect();let new_root = rsgd_step(&root_emb, &grad_to_origin, lr * 0.5);embeddings.insert(root.clone(), new_root);}diff --git a/src/vecstore.rs b/src/vecstore.rsindex 2bf374cc..36ddbb1f 100644--- a/src/vecstore.rs+++ b/src/vecstore.rs@@ -125,6 +125,10 @@ impl VecStore {self.entries.len()}+ pub fn is_empty(&self) -> bool {+ self.entries.is_empty()+ }+pub fn get_text_vec(&self, iri: &str) -> Option<&[f32]> {self.entries.get(iri).map(|e| e.text_vec.as_slice())}