From 21253a2bcbf56a6bb4dfd84da25694de01b80c27 Mon Sep 17 00:00:00 2001 From: mpostma Date: Sat, 27 Jun 2020 11:39:57 +0200 Subject: [PATCH] make setting enums more balanced --- meilisearch-core/src/update/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/meilisearch-core/src/update/mod.rs b/meilisearch-core/src/update/mod.rs index 0a71f1b45..d76649367 100644 --- a/meilisearch-core/src/update/mod.rs +++ b/meilisearch-core/src/update/mod.rs @@ -72,7 +72,7 @@ impl Update { fn settings(data: SettingsUpdate) -> Update { Update { - data: UpdateData::Settings(data), + data: UpdateData::Settings(Box::new(data)), enqueued_at: Utc::now(), } } @@ -85,7 +85,7 @@ pub enum UpdateData { DocumentsAddition(Vec>), DocumentsPartial(Vec>), DocumentsDeletion(Vec), - Settings(SettingsUpdate) + Settings(Box) } impl UpdateData { @@ -117,7 +117,7 @@ pub enum UpdateType { DocumentsAddition { number: usize }, DocumentsPartial { number: usize }, DocumentsDeletion { number: usize }, - Settings { settings: SettingsUpdate }, + Settings { settings: Box }, } #[derive(Debug, Clone, Serialize, Deserialize)] @@ -273,7 +273,7 @@ pub fn update_task<'a, 'b>( let result = apply_settings_update( writer, index, - settings, + *settings, ); (update_type, result, start.elapsed())