From da6ab2753eba1a6fcb5d9815fa35ff3b0da1f4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Fri, 11 Oct 2019 13:49:17 +0200 Subject: [PATCH] Rename Update/Type SchemaUpdate into Schema --- meilidb-core/src/update/mod.rs | 8 ++++---- meilidb-core/src/update/schema_update.rs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meilidb-core/src/update/mod.rs b/meilidb-core/src/update/mod.rs index 0025e2e28..30fb8aba2 100644 --- a/meilidb-core/src/update/mod.rs +++ b/meilidb-core/src/update/mod.rs @@ -22,7 +22,7 @@ use meilidb_schema::Schema; #[derive(Debug, Serialize, Deserialize)] pub enum Update { - SchemaUpdate(Schema), + Schema(Schema), DocumentsAddition(Vec), DocumentsDeletion(Vec), SynonymsAddition(BTreeMap>), @@ -31,7 +31,7 @@ pub enum Update { #[derive(Debug, Clone, Serialize, Deserialize)] pub enum UpdateType { - SchemaUpdate { schema: Schema }, + Schema { schema: Schema }, DocumentsAddition { number: usize }, DocumentsDeletion { number: usize }, SynonymsAddition { number: usize }, @@ -104,10 +104,10 @@ pub fn update_task(writer: &mut rkv::Writer, index: store::Index) -> MResult { + Update::Schema(schema) => { let start = Instant::now(); - let update_type = UpdateType::SchemaUpdate { schema: schema.clone() }; + let update_type = UpdateType::Schema { schema: schema.clone() }; let result = apply_schema_update(writer, index.main, &schema); (update_type, result, start.elapsed()) diff --git a/meilidb-core/src/update/schema_update.rs b/meilidb-core/src/update/schema_update.rs index 6c258c388..6e11c997d 100644 --- a/meilidb-core/src/update/schema_update.rs +++ b/meilidb-core/src/update/schema_update.rs @@ -24,7 +24,7 @@ pub fn push_schema_update( { let last_update_id = next_update_id(writer, updates_store, updates_results_store)?; - let update = Update::SchemaUpdate(schema); + let update = Update::Schema(schema); updates_store.put_update(writer, last_update_id, &update)?; Ok(last_update_id)