Fix clippy errors

This commit is contained in:
ManyTheFish 2023-03-08 10:53:42 +01:00
parent 37d4551e8e
commit 3092cf0448
2 changed files with 7 additions and 7 deletions

View file

@ -100,6 +100,8 @@ pub async fn list_indexes(
Ok(Some(IndexView::new(uid.to_string(), index)?))
})?;
// Won't cause to open all indexes because IndexView doesn't keep the `Index` opened.
// error when trying to fix it: the trait `ExactSizeIterator` is not implemented for `Flatten<IntoIter<Option<IndexView>>>`
#[allow(clippy::needless_collect)]
let indexes: Vec<IndexView> = indexes.into_iter().flatten().collect();
let ret = paginate.as_pagination().auto_paginate_sized(indexes.into_iter());