aboutsummaryrefslogtreecommitdiff
path: root/src/ai_embedders.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai_embedders.rs')
-rw-r--r--src/ai_embedders.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai_embedders.rs b/src/ai_embedders.rs
index b30d890..e8e6c8b 100644
--- a/src/ai_embedders.rs
+++ b/src/ai_embedders.rs
@@ -7,7 +7,7 @@ use crate::{Config, BatchEmbedder, MetricElem};
#[repr(transparent)]
#[derive(Serialize, Deserialize)]
-pub(crate) struct Imgbedding (Vec<f32>); // TODO das hier zu einem const size slice machen
+pub(crate) struct Imgbedding (Vec<f32>);
impl MetricElem for Imgbedding {
fn dist(&self, other: &Self) -> f64 {
self.0.iter().zip(other.0.iter())
@@ -73,10 +73,10 @@ impl BatchEmbedder for ContentEmbedder<'_> {
.stdout(Stdio::piped())
.spawn()?;
- Ok(BufReader::new(child.stdout.unwrap())
+ BufReader::new(child.stdout.unwrap())
.lines()
.progress_count(paths.len().try_into().unwrap())
.map(|l| Ok::<_, anyhow::Error>(serde_json::from_str(&l?)?))
- .try_collect()?)
+ .try_collect()
}
}