From 127171c8120b2b11c8e372fae140cff3c939b75a Mon Sep 17 00:00:00 2001 From: ad hoc Date: Wed, 25 May 2022 14:10:17 +0200 Subject: [PATCH] impl Default on Processing --- meilisearch-lib/src/tasks/scheduler.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/meilisearch-lib/src/tasks/scheduler.rs b/meilisearch-lib/src/tasks/scheduler.rs index 177cc0229..8510ba771 100644 --- a/meilisearch-lib/src/tasks/scheduler.rs +++ b/meilisearch-lib/src/tasks/scheduler.rs @@ -411,16 +411,21 @@ impl Scheduler { } } -#[derive(Debug, Default, PartialEq)] +#[derive(Debug, PartialEq)] pub enum Processing { DocumentAdditions(Vec), IndexUpdate(TaskId), Dump(TaskId), /// Variant used when there is nothing to process. - #[default] Nothing, } +impl Default for Processing { + fn default() -> Self { + Self::Nothing + } +} + enum ProcessingIter<'a> { Many(slice::Iter<'a, TaskId>), Single(Option),