From 9bc7627e274202cbce55ad2e8fac569be9c99260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Lecrenier?= Date: Tue, 5 Jul 2022 15:51:06 +0200 Subject: [PATCH] Fix deserialisation of NDJson documents in benchmarks --- benchmarks/benches/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/benchmarks/benches/utils.rs b/benchmarks/benches/utils.rs index b769bf2c7..f79d925e7 100644 --- a/benchmarks/benches/utils.rs +++ b/benchmarks/benches/utils.rs @@ -161,6 +161,7 @@ fn documents_from_jsonl(reader: impl Read) -> anyhow::Result> { while reader.read_line(&mut buf)? > 0 { documents.extend_from_json(&mut buf.as_bytes())?; + buf.clear(); } documents.finish()?;