diff --git a/examples/write_dir.rs b/examples/write_dir.rs index 058e9e7f..5d689eef 100644 --- a/examples/write_dir.rs +++ b/examples/write_dir.rs @@ -17,16 +17,16 @@ fn main() { const METHOD_STORED : Option = Some(zip::CompressionMethod::Stored); -#[cfg(feature = "bzip2")] -const METHOD_BZIP2 : Option = Some(zip::CompressionMethod::Bzip2); -#[cfg(not(feature = "bzip2"))] -const METHOD_BZIP2 : Option = None; - #[cfg(feature = "deflate")] const METHOD_DEFLATED : Option = Some(zip::CompressionMethod::Deflated); #[cfg(not(feature = "deflate"))] const METHOD_DEFLATED : Option = None; +#[cfg(feature = "bzip2")] +const METHOD_BZIP2 : Option = Some(zip::CompressionMethod::Bzip2); +#[cfg(not(feature = "bzip2"))] +const METHOD_BZIP2 : Option = None; + fn real_main() -> i32 { let args: Vec<_> = std::env::args().collect(); if args.len() < 3 { @@ -37,7 +37,7 @@ fn real_main() -> i32 { let src_dir = &*args[1]; let dst_file = &*args[2]; - for &method in [METHOD_STORED, METHOD_BZIP2, METHOD_DEFLATED].iter() { + for &method in [METHOD_STORED, METHOD_DEFLATED, METHOD_BZIP2].iter() { if method.is_none() { continue } match doit(src_dir, dst_file, method.unwrap()) { Ok(_) => println!("done: {} written to {}", src_dir, dst_file),