Tweak style

This commit is contained in:
Dirkjan Ochtman 2021-01-07 15:58:46 +01:00
parent db1d3128ec
commit 459f5e4d65
1 changed files with 4 additions and 6 deletions

View File

@ -276,13 +276,11 @@ fn insert<P: Point>(layer: &mut Vec<ZeroNode>, new: PointId, found: &[Candidate]
} }
let nearest = &mut layer[pid.0 as usize].nearest; let nearest = &mut layer[pid.0 as usize].nearest;
if !nearest[idx].is_valid() { if nearest[idx].is_valid() {
nearest[idx] = new;
continue;
}
let end = (M * 2) - 1; let end = (M * 2) - 1;
nearest.copy_within(idx..end, idx + 1); nearest.copy_within(idx..end, idx + 1);
}
nearest[idx] = new; nearest[idx] = new;
} }
@ -334,8 +332,8 @@ impl Search {
visited, visited,
candidates, candidates,
nearest, nearest,
ef: _,
furthest, furthest,
ef: _,
} = self; } = self;
visited.clear(); visited.clear();