Add Search::get() helper for bindings
This commit is contained in:
parent
16cac129f9
commit
1e15c683ef
|
@ -673,6 +673,11 @@ impl Search {
|
|||
fn iter(&self) -> impl Iterator<Item = PointId> + ExactSizeIterator + '_ {
|
||||
self.nearest.iter().map(|candidate| candidate.pid)
|
||||
}
|
||||
|
||||
#[doc(hidden)]
|
||||
pub fn get(&self, i: usize) -> Option<PointId> {
|
||||
self.nearest.get(i).map(|candidate| candidate.pid)
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Search {
|
||||
|
|
Loading…
Reference in New Issue