From 0f33a65468b94a43e8eebd1582e2a3263727791a Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 13 Mar 2023 16:51:11 +0100 Subject: [PATCH] makes kero happy --- milli/src/documents/builder.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/milli/src/documents/builder.rs b/milli/src/documents/builder.rs index ace9340d7..e5124f67f 100644 --- a/milli/src/documents/builder.rs +++ b/milli/src/documents/builder.rs @@ -114,9 +114,9 @@ impl DocumentsBatchBuilder { self.value_buffer.clear(); let value = &record[*i]; + let trimmed_value = value.trim(); match type_ { AllowedType::Number => { - let trimmed_value = value.trim(); if trimmed_value.is_empty() { to_writer(&mut self.value_buffer, &Value::Null)?; } else if let Ok(integer) = trimmed_value.parse::() { @@ -137,7 +137,6 @@ impl DocumentsBatchBuilder { } } AllowedType::Boolean => { - let trimmed_value = value.trim(); if trimmed_value.is_empty() { to_writer(&mut self.value_buffer, &Value::Null)?; } else {