docs(examples): Update FileOptions import

This commit is contained in:
Chris Hennick 2024-05-01 15:06:55 -07:00
parent 831ffcefe9
commit fbf000cf56
No known key found for this signature in database
GPG key ID: DA47AABA4961C509

View file

@ -2,7 +2,7 @@
use std::io::Write;
use zip::write::FileOptions;
use zip::write::{SimpleFileOptions};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let args: Vec<_> = std::env::args().collect();
if args.len() < 2 {
@ -18,7 +18,7 @@ fn doit(filename: &str) -> zip::result::ZipResult<()> {
let file = std::fs::File::create(filename)?;
let mut zip = zip::ZipWriter::new(file);
let options = FileOptions::default()
let options = SimpleFileOptions::default()
.compression_method(zip::CompressionMethod::Deflated)
// files over u32::MAX require this flag set.
.large_file(true)