diff --git a/src/classic/platform/argparse.rs b/src/classic/platform/argparse.rs index eea96c176..b1d4697e2 100644 --- a/src/classic/platform/argparse.rs +++ b/src/classic/platform/argparse.rs @@ -287,14 +287,13 @@ impl ArgumentParser { lcopy.push(v); params.insert(name, ArgumentValue::ArgArray(lcopy)); } - _ => match &optional_arg.options.default { - Some(v) => { + _ => { + if let Some(v) = &optional_arg.options.default { let mut lcopy = l.clone(); lcopy.push(v.clone()); params.insert(name, ArgumentValue::ArgArray(lcopy)); } - None => {} - }, + } }, _ => { if let Ok(v) = converter.convert(value) {