docs(examples): Update FileOptions import
This commit is contained in:
parent
831ffcefe9
commit
fbf000cf56
1 changed files with 2 additions and 2 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
|
|
||||||
use zip::write::FileOptions;
|
use zip::write::{SimpleFileOptions};
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let args: Vec<_> = std::env::args().collect();
|
let args: Vec<_> = std::env::args().collect();
|
||||||
if args.len() < 2 {
|
if args.len() < 2 {
|
||||||
|
@ -18,7 +18,7 @@ fn doit(filename: &str) -> zip::result::ZipResult<()> {
|
||||||
let file = std::fs::File::create(filename)?;
|
let file = std::fs::File::create(filename)?;
|
||||||
let mut zip = zip::ZipWriter::new(file);
|
let mut zip = zip::ZipWriter::new(file);
|
||||||
|
|
||||||
let options = FileOptions::default()
|
let options = SimpleFileOptions::default()
|
||||||
.compression_method(zip::CompressionMethod::Deflated)
|
.compression_method(zip::CompressionMethod::Deflated)
|
||||||
// files over u32::MAX require this flag set.
|
// files over u32::MAX require this flag set.
|
||||||
.large_file(true)
|
.large_file(true)
|
||||||
|
|
Loading…
Add table
Reference in a new issue