From 526793b5b29b31325e078843fa3f34a336709804 Mon Sep 17 00:00:00 2001 From: Kerollmops Date: Tue, 13 Dec 2022 14:58:32 +0100 Subject: [PATCH] Handle empty arrays the same way we handle other arrays --- meilisearch-types/src/document_formats.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/meilisearch-types/src/document_formats.rs b/meilisearch-types/src/document_formats.rs index d6ca578ff..f3b4d090f 100644 --- a/meilisearch-types/src/document_formats.rs +++ b/meilisearch-types/src/document_formats.rs @@ -136,11 +136,7 @@ fn read_json_inner( match array_each(&mut deserializer, |obj| builder.append_json_object(&obj)) { // The json data has been deserialized and does not need to be processed again. // The data has been transferred to the writer during the deserialization process. - Ok(Ok(count)) => { - if count == 0 { - return Ok(count as usize); - } - } + Ok(Ok(_)) => (), Ok(Err(e)) => return Err(DocumentFormatError::Internal(Box::new(e))), Err(_) => { // If we cannot deserialize the content as an array of object then