Update src/index_controller/local_index_controller/mod.rs

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
marin 2021-03-05 19:08:28 +01:00 committed by mpostma
parent 7d2ae9089e
commit c0515bcfe2
No known key found for this signature in database
GPG Key ID: CBC8A7C1D7A28C3A

View File

@ -116,8 +116,7 @@ impl IndexController for LocalIndexController {
// If an update is processing, filter out this update from the pending // If an update is processing, filter out this update from the pending
// updates. // updates.
.filter(|(_, u)| processing_id .filter(|(_, u)| processing_id
.map(|id| id != u.id()) .map_or(true, |id| id != u.id()))
.unwrap_or(true))
.map(|(_, u)| UpdateStatus::from(u))) .map(|(_, u)| UpdateStatus::from(u)))
.chain(aborted.filter_map(Result::ok).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))) .chain(processed.filter_map(Result::ok).map(|(_, u)| UpdateStatus::from(u)))