Apply suggestions from clippy 1.76

This commit is contained in:
Dirkjan Ochtman 2024-02-09 09:35:07 +01:00
parent ad00856f7a
commit a0e117a70c
No known key found for this signature in database
1 changed files with 3 additions and 3 deletions

View File

@ -155,7 +155,7 @@ where
&'a self,
point: &P,
search: &'a mut Search,
) -> impl Iterator<Item = MapItem<'a, P, V>> + ExactSizeIterator + 'a {
) -> impl ExactSizeIterator<Item = MapItem<'a, P, V>> + 'a {
self.hnsw
.search(point, search)
.map(move |item| MapItem::from(item, self))
@ -353,7 +353,7 @@ where
&'b self,
point: &P,
search: &'a mut Search,
) -> impl Iterator<Item = Item<'b, P>> + ExactSizeIterator + 'a {
) -> impl ExactSizeIterator<Item = Item<'b, P>> + 'a {
search.reset();
let map = move |candidate| Item::new(candidate, self);
if self.points.is_empty() {
@ -759,7 +759,7 @@ impl Search {
&self.nearest
}
fn iter(&self) -> impl Iterator<Item = Candidate> + ExactSizeIterator + '_ {
fn iter(&self) -> impl ExactSizeIterator<Item = Candidate> + '_ {
self.nearest.iter().copied()
}
}