[No-auto] bin/core/category: 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:31:13 +02:00 committed by Matthias Beyer
parent 846304e687
commit cba336e1dd

View file

@ -70,25 +70,23 @@ fn main() {
"Add a category to entries and manage categories",
ui::build_ui);
rt.cli()
.subcommand_name()
.map(|name| {
match name {
"set" => set(&rt),
"get" => get(&rt),
"list-category" => list_category(&rt),
"create-category" => create_category(&rt),
"delete-category" => delete_category(&rt),
"list-categories" => list_categories(&rt),
other => {
debug!("Unknown command");
let _ = rt.handle_unknown_subcommand("imag-category", other, rt.cli())
.map_err_trace_exit_unwrap()
.code()
.map(::std::process::exit);
},
}
});
if let Some(name) = rt.cli().subcommand_name() {
match name {
"set" => set(&rt),
"get" => get(&rt),
"list-category" => list_category(&rt),
"create-category" => create_category(&rt),
"delete-category" => delete_category(&rt),
"list-categories" => list_categories(&rt),
other => {
debug!("Unknown command");
let _ = rt.handle_unknown_subcommand("imag-category", other, rt.cli())
.map_err_trace_exit_unwrap()
.code()
.map(::std::process::exit);
},
}
}
}
fn set(rt: &Runtime) {