mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-01-31 15:31:53 +08:00
Make clippy happy
This commit is contained in:
parent
2cf747cb89
commit
3b560ef7d0
@ -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();
|
||||
|
@ -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() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user