revert the code order changes
This commit is contained in:
parent
c05b6c2317
commit
9e849ef089
1 changed files with 6 additions and 6 deletions
|
@ -17,16 +17,16 @@ fn main() {
|
||||||
|
|
||||||
const METHOD_STORED : Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Stored);
|
const METHOD_STORED : Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Stored);
|
||||||
|
|
||||||
#[cfg(feature = "bzip2")]
|
|
||||||
const METHOD_BZIP2 : Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Bzip2);
|
|
||||||
#[cfg(not(feature = "bzip2"))]
|
|
||||||
const METHOD_BZIP2 : Option<zip::CompressionMethod> = None;
|
|
||||||
|
|
||||||
#[cfg(feature = "deflate")]
|
#[cfg(feature = "deflate")]
|
||||||
const METHOD_DEFLATED : Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Deflated);
|
const METHOD_DEFLATED : Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Deflated);
|
||||||
#[cfg(not(feature = "deflate"))]
|
#[cfg(not(feature = "deflate"))]
|
||||||
const METHOD_DEFLATED : Option<zip::CompressionMethod> = None;
|
const METHOD_DEFLATED : Option<zip::CompressionMethod> = None;
|
||||||
|
|
||||||
|
#[cfg(feature = "bzip2")]
|
||||||
|
const METHOD_BZIP2 : Option<zip::CompressionMethod> = Some(zip::CompressionMethod::Bzip2);
|
||||||
|
#[cfg(not(feature = "bzip2"))]
|
||||||
|
const METHOD_BZIP2 : Option<zip::CompressionMethod> = None;
|
||||||
|
|
||||||
fn real_main() -> i32 {
|
fn real_main() -> i32 {
|
||||||
let args: Vec<_> = std::env::args().collect();
|
let args: Vec<_> = std::env::args().collect();
|
||||||
if args.len() < 3 {
|
if args.len() < 3 {
|
||||||
|
@ -37,7 +37,7 @@ fn real_main() -> i32 {
|
||||||
|
|
||||||
let src_dir = &*args[1];
|
let src_dir = &*args[1];
|
||||||
let dst_file = &*args[2];
|
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 }
|
if method.is_none() { continue }
|
||||||
match doit(src_dir, dst_file, method.unwrap()) {
|
match doit(src_dir, dst_file, method.unwrap()) {
|
||||||
Ok(_) => println!("done: {} written to {}", src_dir, dst_file),
|
Ok(_) => println!("done: {} written to {}", src_dir, dst_file),
|
||||||
|
|
Loading…
Add table
Reference in a new issue