diff --git a/crates/milli/src/update/new/indexer/document_operation.rs b/crates/milli/src/update/new/indexer/document_operation.rs index c0f1ffbdd..d4f11389a 100644 --- a/crates/milli/src/update/new/indexer/document_operation.rs +++ b/crates/milli/src/update/new/indexer/document_operation.rs @@ -310,10 +310,10 @@ impl MergeChanges for MergeDocumentForReplacement { } Some(InnerDocOp::Deletion) => { return if is_new { + Ok(None) + } else { let deletion = Deletion::create(docid, external_doc); Ok(Some(DocumentChange::Deletion(deletion))) - } else { - Ok(None) }; } None => unreachable!("We must not have empty set of operations on a document"),