[No-auto] bin/core/annotate: Fix Clippy warnings

Signed-off-by: flip1995 <hello@philkrones.com>
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
flip1995 2019-08-27 10:30:56 +02:00 committed by Matthias Beyer
parent 3a1f0dde9d
commit 846304e687

View file

@ -77,22 +77,20 @@ fn main() {
"Add annotations to entries", "Add annotations to entries",
ui::build_ui); ui::build_ui);
rt.cli() if let Some(name) = rt.cli().subcommand_name() {
.subcommand_name() match name {
.map(|name| { "add" => add(&rt),
match name { "remove" => remove(&rt),
"add" => add(&rt), "list" => list(&rt),
"remove" => remove(&rt), other => {
"list" => list(&rt), debug!("Unknown command");
other => { let _ = rt.handle_unknown_subcommand("imag-annotation", other, rt.cli())
debug!("Unknown command"); .map_err_trace_exit_unwrap()
let _ = rt.handle_unknown_subcommand("imag-annotation", other, rt.cli()) .code()
.map_err_trace_exit_unwrap() .map(::std::process::exit);
.code() },
.map(::std::process::exit); }
}, }
}
});
} }
fn add(rt: &Runtime) { fn add(rt: &Runtime) {