From 0605c0ac682993233e98b70cdd553564abee7ebd Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 13 Jan 2022 18:51:08 +0100 Subject: [PATCH] apply review comments --- milli/fuzz/fuzz_targets/indexing.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/milli/fuzz/fuzz_targets/indexing.rs b/milli/fuzz/fuzz_targets/indexing.rs index 9b63983fb..327df09d1 100644 --- a/milli/fuzz/fuzz_targets/indexing.rs +++ b/milli/fuzz/fuzz_targets/indexing.rs @@ -91,13 +91,13 @@ fuzz_target!(|batches: Vec>| { let mut documents = Cursor::new(Vec::new()); - // We ignore all badly generated documents - if let Ok(_count) = read_json(json.as_bytes(), &mut documents) { + // We ignore all malformed documents + if let Ok(_) = read_json(json.as_bytes(), &mut documents) { documents.rewind().unwrap(); let documents = DocumentBatchReader::from_reader(documents).unwrap(); - match index_documents(&mut index, documents) { - _ => (), - } + // A lot of errors can come out of milli and we don't know which ones are normal or not + // so we are only going to look for the unexpected panics. + let _ = index_documents(&mut index, documents); } }