rename variables correctly
@@ -85,14 +85,14 @@ struct CLIArgs {
overwrite_files: bool,
/// Enable tar archive generation
- #[structopt(short = "r", long = "tar-enabled")]
- tar_enabled: bool,
+ #[structopt(short = "r", long = "enable-tar")]
+ enable_tar: bool,
/// Enable zip archive generation
/// Zipping large directories can result in out-of-memory exception
/// because zip generation is done in memory and cannot be sent on the fly
- #[structopt(short = "z", long = "zip-enabled")]
- zip_enabled: bool,
+ #[structopt(short = "z", long = "enable-zip")]
+ enable_zip: bool,
}
/// Checks wether an interface is valid, i.e. it can be parsed into an IP address
@@ -182,8 +182,8 @@ pub fn parse_args() -> crate::MiniserveConfig {
index: args.index,
overwrite_files: args.overwrite_files,
file_upload: args.file_upload,
- tar_enabled: args.tar_enabled,
- zip_enabled: args.zip_enabled,
+ tar_enabled: args.enable_tar,
+ zip_enabled: args.enable_zip,
}
}
