fix: arrays aren't io::Write

This commit is contained in:
Marli Frost 2020-08-19 13:36:17 +01:00
parent 33cd959b11
commit 54e532f26e
No known key found for this signature in database
GPG key ID: CB0BEA7CF9BD1245

View file

@ -48,7 +48,7 @@ enum GenericZipWriter<W: Write + io::Seek> {
///
/// // 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)?;