From 0a4118329eafc4fca2055b368f85b5a4b35054f3 Mon Sep 17 00:00:00 2001 From: ManyTheFish Date: Wed, 5 Jun 2024 10:51:16 +0200 Subject: [PATCH] Put only_additional_fields to None if the difference gives an empty result. --- milli/src/update/settings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/milli/src/update/settings.rs b/milli/src/update/settings.rs index 11a249068..952b017c6 100644 --- a/milli/src/update/settings.rs +++ b/milli/src/update/settings.rs @@ -1127,7 +1127,7 @@ impl InnerIndexSettingsDiff { let new: HashSet<_> = new.iter().cloned().collect(); if old.difference(&new).next().is_none() { // if no field has been removed return only the additional ones - Some(&new - &old) + Some(&new - &old).filter(|x| !x.is_empty()) } else { None }