From dfce9ba4683727b27998865cca6205dbed921478 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Thu, 2 Jun 2022 11:26:12 +0200 Subject: [PATCH] Apply suggestions --- meilisearch-http/src/routes/tasks.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch-http/src/routes/tasks.rs b/meilisearch-http/src/routes/tasks.rs index 49554858d..2f62615fd 100644 --- a/meilisearch-http/src/routes/tasks.rs +++ b/meilisearch-http/src/routes/tasks.rs @@ -138,12 +138,12 @@ async fn get_tasks( // We +1 just to know if there is more after this "page" or not. let limit = limit.saturating_add(1); - let mut tasks_results = meilisearch + let mut tasks_results: Vec<_> = meilisearch .list_tasks(filters, Some(limit), from) .await? .into_iter() .map(TaskView::from) - .collect::>(); + .collect(); // If we were able to fetch the number +1 tasks we asked // it means that there is more to come.