From acf741e72196b954e1843d6131c5b99c0667d567 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sat, 12 Aug 2023 22:51:39 +0300 Subject: [PATCH] source tests: check write on `write_sample_zip` --- lib/src/source.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/source.rs b/lib/src/source.rs index e7afcc0..61f0209 100644 --- a/lib/src/source.rs +++ b/lib/src/source.rs @@ -261,9 +261,9 @@ pub mod reader_sync { zip_file .start_file("test.json", options) .expect("zip start file"); - zip_file - .write(serde_json::to_vec(&batch).unwrap().as_slice()) - .expect("write entry"); + let data = serde_json::to_vec(&batch).unwrap(); + let amount = zip_file.write(data.as_slice()).expect("write entry"); + assert_eq!(amount, data.len()); zip_file.finish().expect("finish zip file"); }