From c0515bcfe206247f49c14bdf8fec346351f9bd54 Mon Sep 17 00:00:00 2001 From: marin Date: Fri, 5 Mar 2021 19:08:28 +0100 Subject: [PATCH] Update src/index_controller/local_index_controller/mod.rs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Renault --- .../src/index_controller/local_index_controller/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meilisearch-http/src/index_controller/local_index_controller/mod.rs b/meilisearch-http/src/index_controller/local_index_controller/mod.rs index 6b917b0e1..d3fa532dc 100644 --- a/meilisearch-http/src/index_controller/local_index_controller/mod.rs +++ b/meilisearch-http/src/index_controller/local_index_controller/mod.rs @@ -116,8 +116,7 @@ impl IndexController for LocalIndexController { // If an update is processing, filter out this update from the pending // updates. .filter(|(_, u)| processing_id - .map(|id| id != u.id()) - .unwrap_or(true)) + .map_or(true, |id| id != u.id())) .map(|(_, u)| UpdateStatus::from(u))) .chain(aborted.filter_map(Result::ok).map(|(_, u)| UpdateStatus::from(u))) .chain(processed.filter_map(Result::ok).map(|(_, u)| UpdateStatus::from(u)))