From 962b5fffd84bc8b919d369c2a8cf7d3efbfa616c Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Wed, 18 Apr 2018 14:30:53 +0200 Subject: [PATCH] Remove unused imports/code --- bin/domain/imag-wiki/src/main.rs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/bin/domain/imag-wiki/src/main.rs b/bin/domain/imag-wiki/src/main.rs index f211fa17..5c393bca 100644 --- a/bin/domain/imag-wiki/src/main.rs +++ b/bin/domain/imag-wiki/src/main.rs @@ -32,18 +32,12 @@ extern crate libimagutil; use std::io::Write; -use clap::ArgMatches; -use regex::Regex; - use libimagrt::runtime::Runtime; use libimagrt::setup::generate_runtime_setup; -use libimagerror::trace::{MapErrTrace, trace_error}; +use libimagerror::trace::MapErrTrace; use libimagerror::exit::ExitUnwrap; use libimagerror::io::ToExitCode; -use libimagstore::storeid::IntoStoreId; -use libimagstore::store::FileLockEntry; use libimagwiki::store::WikiStore; -use libimagwiki::wiki::Wiki; use libimagentryedit::edit::{Edit, EditHeader}; mod ui; @@ -62,7 +56,7 @@ fn main() { Some("ids") => ids(&rt, wiki_name), Some("idof") => idof(&rt, wiki_name), Some("create") => create(&rt, wiki_name), - Some("create-wiki") => create_wiki(&rt, wiki_name), + Some("create-wiki") => create_wiki(&rt), Some("show") => show(&rt, wiki_name), Some("delete") => delete(&rt, wiki_name), Some(other) => { @@ -104,9 +98,6 @@ fn ids(rt: &Runtime, wiki_name: &str) { } fn idof(rt: &Runtime, wiki_name: &str) { - use std::path::PathBuf; - use libimagstore::storeid::IntoStoreId; - let scmd = rt.cli().subcommand_matches("idof").unwrap(); // safed by clap let entryname = scmd @@ -186,11 +177,10 @@ fn create(rt: &Runtime, wiki_name: &str) { } } -fn create_wiki(rt: &Runtime, wiki_name: &str) { +fn create_wiki(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("create-wiki").unwrap(); // safed by clap let wiki_name = String::from(scmd.value_of("create-wiki-name").unwrap()); // safe by clap - - let wiki = rt.store().create_wiki(&wiki_name).map_err_trace_exit_unwrap(1); + let _ = rt.store().create_wiki(&wiki_name).map_err_trace_exit_unwrap(1); } fn show(rt: &Runtime, wiki_name: &str) {