Apply suggestions from clippy 1.76
This commit is contained in:
parent
ad00856f7a
commit
a0e117a70c
|
@ -155,7 +155,7 @@ where
|
||||||
&'a self,
|
&'a self,
|
||||||
point: &P,
|
point: &P,
|
||||||
search: &'a mut Search,
|
search: &'a mut Search,
|
||||||
) -> impl Iterator<Item = MapItem<'a, P, V>> + ExactSizeIterator + 'a {
|
) -> impl ExactSizeIterator<Item = MapItem<'a, P, V>> + 'a {
|
||||||
self.hnsw
|
self.hnsw
|
||||||
.search(point, search)
|
.search(point, search)
|
||||||
.map(move |item| MapItem::from(item, self))
|
.map(move |item| MapItem::from(item, self))
|
||||||
|
@ -353,7 +353,7 @@ where
|
||||||
&'b self,
|
&'b self,
|
||||||
point: &P,
|
point: &P,
|
||||||
search: &'a mut Search,
|
search: &'a mut Search,
|
||||||
) -> impl Iterator<Item = Item<'b, P>> + ExactSizeIterator + 'a {
|
) -> impl ExactSizeIterator<Item = Item<'b, P>> + 'a {
|
||||||
search.reset();
|
search.reset();
|
||||||
let map = move |candidate| Item::new(candidate, self);
|
let map = move |candidate| Item::new(candidate, self);
|
||||||
if self.points.is_empty() {
|
if self.points.is_empty() {
|
||||||
|
@ -759,7 +759,7 @@ impl Search {
|
||||||
&self.nearest
|
&self.nearest
|
||||||
}
|
}
|
||||||
|
|
||||||
fn iter(&self) -> impl Iterator<Item = Candidate> + ExactSizeIterator + '_ {
|
fn iter(&self) -> impl ExactSizeIterator<Item = Candidate> + '_ {
|
||||||
self.nearest.iter().copied()
|
self.nearest.iter().copied()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue