Skip to content

Commit

Permalink
Collapse match
Browse files Browse the repository at this point in the history
  • Loading branch information
twe4ked committed Apr 20, 2020
1 parent 043d51f commit 7906ecc
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/main.rs
Expand Up @@ -56,15 +56,9 @@ impl FromStr for Shell {
fn main() {
let options = Options::parse();

if let Some(subcmd) = options.subcmd {
match subcmd {
SubCommand::Init(o) => {
init(o);
return;
}
}
} else {
prompt(options);
match options.subcmd {
Some(SubCommand::Init(o)) => init(o),
_ => prompt(options),
}
}

Expand Down

0 comments on commit 7906ecc

Please sign in to comment.