Tweak style
This commit is contained in:
parent
db1d3128ec
commit
459f5e4d65
10
src/lib.rs
10
src/lib.rs
|
@ -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;
|
let end = (M * 2) - 1;
|
||||||
continue;
|
nearest.copy_within(idx..end, idx + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
let end = (M * 2) - 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();
|
||||||
|
|
Loading…
Reference in New Issue