Go to file
Wolfgang Bumiller 03fb895197 getopt: condense nested match to reduce indentation
The `match value` statement is the only thing covering the
entire RawArgument::Option case. `rustfmt` suggests this
more condensed way of writing this case.

See the `git diff -w` of this patch:
|diff --git a/src/getopts.rs b/src/getopts.rs
|index 9755af2..4db4579 100644
|--- a/src/getopts.rs
|+++ b/src/getopts.rs
|@@ -72,8 +72,7 @@ pub fn parse_arguments<T: AsRef<str>>(
|             RawArgument::Separator => {
|                 break;
|             }
|-            RawArgument::Option { name, value } => {
|-                match value {
|+            RawArgument::Option { name, value } => match value {
|                 None => {
|                     let mut want_bool = false;
|                     let mut can_default = false;
|@@ -125,7 +124,6 @@ pub fn parse_arguments<T: AsRef<str>>(
|                     data.push((name, v));
|                 }
|             }
|-            }
|             RawArgument::Argument { value } => {
|                 rest.push(value);
|             }

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2018-12-28 14:16:58 +01:00
debian use proxmox-backup as package name 2018-12-20 10:45:14 +01:00
src getopt: condense nested match to reduce indentation 2018-12-28 14:16:58 +01:00
www extract version from environment 2018-12-05 14:40:45 +01:00
.gitignore add rust standard .gitignore file 2018-12-19 11:06:51 +01:00
Cargo.toml use openssl for faster hashing 2018-12-22 14:31:59 +01:00
Makefile use proxmox-backup as package name 2018-12-20 10:45:14 +01:00