From ea3b269b7722b7e1f1b459b7b35487ad1d0c4eb4 Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 23 Jan 2023 23:59:34 +0100 Subject: [PATCH] reformat --- index-scheduler/src/batch.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index-scheduler/src/batch.rs b/index-scheduler/src/batch.rs index 97fc14e44..bae92c37f 100644 --- a/index-scheduler/src/batch.rs +++ b/index-scheduler/src/batch.rs @@ -1003,11 +1003,13 @@ impl IndexScheduler { match index.primary_key(index_wtxn)? { // if a primary key was set AND had already been defined in the index // but to a different value, we can make the whole batch fail. - Some(pk) => if primary_key != pk { - return Err(milli::Error::from( - milli::UserError::PrimaryKeyCannotBeChanged(pk.to_string()), - ) - .into()); + Some(pk) => { + if primary_key != pk { + return Err(milli::Error::from( + milli::UserError::PrimaryKeyCannotBeChanged(pk.to_string()), + ) + .into()); + } } // if the primary key was set and there was no primary key set for this index // we set it to the received value before starting the indexing process.