diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-10-01 03:14:08 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-10-01 03:14:08 -0400 |
commit | e567ec7a856a97020bd176d5383f585cc4c021ad (patch) | |
tree | 97488dfadd0434a2a45b0de08b81da4452f71299 /src | |
parent | 3ab28be37b0bc7a46bb68d69bc486c9f63fd199e (diff) | |
download | teleterm-e567ec7a856a97020bd176d5383f585cc4c021ad.tar.gz teleterm-e567ec7a856a97020bd176d5383f585cc4c021ad.zip |
cast by default
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd.rs | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -53,8 +53,7 @@ pub fn parse<'a>() -> Result<clap::ArgMatches<'a>> { clap::App::new(crate::util::program_name().context(FindProgramName)?) .about("Broadcast your terminal for other people to watch") .author(clap::crate_authors!()) - .version(clap::crate_version!()) - .setting(clap::AppSettings::SubcommandRequired); + .version(clap::crate_version!()); for cmd in COMMANDS { let subcommand = clap::SubCommand::with_name(cmd.name); @@ -70,5 +69,5 @@ pub fn run(matches: &clap::ArgMatches<'_>) -> Result<()> { return (cmd.run)(submatches); } } - unreachable!() + (COMMANDS[0].run)(&clap::ArgMatches::<'_>::default()) } |