From 4cb2c6ef1e16894054c111b5a1aaac93cfca5d3a Mon Sep 17 00:00:00 2001 From: ad hoc Date: Mon, 30 May 2022 12:30:15 +0200 Subject: [PATCH] use map_or instead of map + unwrap_or --- meilisearch-lib/src/tasks/task_store/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/meilisearch-lib/src/tasks/task_store/mod.rs b/meilisearch-lib/src/tasks/task_store/mod.rs index deb3f8191..3645717e6 100644 --- a/meilisearch-lib/src/tasks/task_store/mod.rs +++ b/meilisearch-lib/src/tasks/task_store/mod.rs @@ -36,8 +36,7 @@ impl TaskFilter { Some(ref index_uid) => self .indexes .as_ref() - .map(|indexes| indexes.contains(index_uid.as_str())) - .unwrap_or(true), + .map_or(true, |indexes| indexes.contains(index_uid.as_str())), None => false, } }