From 54e532f26e97e4d2a9e726172959b5d427ffcab5 Mon Sep 17 00:00:00 2001 From: Marli Frost Date: Wed, 19 Aug 2020 13:36:17 +0100 Subject: [PATCH] fix: arrays aren't io::Write --- src/write.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write.rs b/src/write.rs index 0a861cd9..cf43c3fb 100644 --- a/src/write.rs +++ b/src/write.rs @@ -48,7 +48,7 @@ enum GenericZipWriter { /// /// // We use a buffer here, though you'd normally use a `File` /// let mut buf = [0; 65536]; -/// let mut zip = zip::ZipWriter::new(std::io::Cursor::new(&mut buf)); +/// let mut zip = zip::ZipWriter::new(std::io::Cursor::new(&mut buf[..])); /// /// let options = zip::write::FileOptions::default().compression_method(zip::CompressionMethod::Stored); /// zip.start_file("hello_world.txt", options)?;