Update meilisearch/src/routes/indexes/mod.rs

Co-authored-by: Louis Dureuil <louis@meilisearch.com>
This commit is contained in:
Many the fish 2023-03-09 15:17:03 +01:00 committed by GitHub
parent dff2715ef3
commit dea101e3d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,6 @@ 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>>>`
let indexes: Vec<IndexView> = indexes.into_iter().flatten().collect();
let ret = paginate.as_pagination().auto_paginate_sized(indexes.into_iter());