summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-01-15 14:58:19 +0100
committerJustus Winter <justus@sequoia-pgp.org>2019-01-15 14:58:19 +0100
commit1291c0965472e1601a9748afa0e9d5ac9827cdb1 (patch)
tree70010488fb4050141c84f4279b2fb60439441ce7 /tool
parentd6818ddd1031d98d3762a20db8303f3d6eb5d5b7 (diff)
tool: Drop unreachable code.
- AppSettings::ArgRequiredElseHelp makes sure this doesn't happen.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/sq.rs25
1 files changed, 5 insertions, 20 deletions
diff --git a/tool/src/sq.rs b/tool/src/sq.rs
index 2242d6e6..ffce734d 100644
--- a/tool/src/sq.rs
+++ b/tool/src/sq.rs
@@ -213,10 +213,7 @@ fn real_main() -> Result<(), failure::Error> {
}
}
}
- _ => {
- eprintln!("No autocrypt subcommand given.");
- exit(1);
- }
+ _ => unreachable!(),
}
},
@@ -285,10 +282,7 @@ fn real_main() -> Result<(), failure::Error> {
ks.send(&tpk)
.context("Failed to send key to server")?;
},
- _ => {
- eprintln!("No keyserver subcommand given.");
- exit(1);
- },
+ _ => unreachable!(),
}
},
("store", Some(m)) => {
@@ -352,10 +346,7 @@ fn real_main() -> Result<(), failure::Error> {
print_log(store.log().context("Failed to get log")?, true);
}
},
- _ => {
- eprintln!("No store subcommand given.");
- exit(1);
- },
+ _ => unreachable!(),
}
},
("list", Some(m)) => {
@@ -406,20 +397,14 @@ fn real_main() -> Result<(), failure::Error> {
("log", Some(_)) => {
print_log(Store::server_log(&ctx)?, true);
},
- _ => {
- eprintln!("No list subcommand given.");
- exit(1);
- },
+ _ => unreachable!(),
}
},
("key", Some(m)) => match m.subcommand() {
("generate", Some(m)) => commands::key::generate(m, force)?,
_ => unreachable!(),
},
- _ => {
- eprintln!("No subcommand given.");
- exit(1);
- },
+ _ => unreachable!(),
}
return Ok(())