diff --git a/examples/multicall_busybox.rs b/examples/multicall_busybox.rs index 8703bed7c5a5..00d380011554 100644 --- a/examples/multicall_busybox.rs +++ b/examples/multicall_busybox.rs @@ -34,19 +34,17 @@ fn main() { .subcommand(false_applet()); let matches = app.get_matches(); - match matches.subcommand() { - Some(("busybox", cmd)) => { - if cmd.occurrences_of("install") > 0 { - unimplemented!("Make hardlinks to the executable here"); - } - match cmd.subcommand() { - Some(("false", _)) => exit(1), - Some(("true", _)) => exit(0), - _ => unreachable!(), - } + let mut subcommand = matches.subcommand(); + if let Some(("busybox", cmd)) = subcommand { + if cmd.occurrences_of("install") > 0 { + unimplemented!("Make hardlinks to the executable here"); } - Some(("false", _)) => exit(1), - Some(("true", _)) => exit(0), - _ => unreachable!(), + subcommand = cmd.subcommand(); + } + if let Some(("false", _)) = subcommand { + exit(1) + } + if let Some(("true", _)) = subcommand { + exit(0) } }