Make clippy happy

This commit is contained in:
Kerollmops 2023-06-14 15:59:10 +02:00 committed by Clément Renault
parent 2cf747cb89
commit 3b560ef7d0
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ impl Metric<Vec<f32>> for Euclidean {
#[cfg(all(target_arch = "aarch64", target_feature = "neon"))]
{
if std::arch::is_aarch64_feature_detected!("neon") && a.len() >= MIN_DIM_SIZE_SIMD {
let squared = unsafe { squared_euclid_neon(&a, &b) };
let squared = unsafe { squared_euclid_neon(a, b) };
let dist = squared.sqrt();
debug_assert!(!dist.is_nan());
return dist.to_bits();

View File

@ -454,7 +454,7 @@ pub fn execute_search(
let hnsw = ctx.index.vector_hnsw(ctx.txn)?.unwrap_or_default();
let ef = hnsw.len().min(100);
let mut dest = vec![Neighbor { index: 0, distance: 0 }; ef];
let neighbors = hnsw.nearest(&vector, ef, &mut searcher, &mut dest[..]);
let neighbors = hnsw.nearest(vector, ef, &mut searcher, &mut dest[..]);
let mut docids = Vec::new();
for Neighbor { index, distance: _ } in neighbors.iter() {