summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2018-04-18 14:30:53 +0200
committerMatthias Beyer <mail@beyermatthias.de>2018-04-18 14:32:23 +0200
commit962b5fffd84bc8b919d369c2a8cf7d3efbfa616c (patch)
tree597ff3eb28f2ba001f7ba068323735ac951f8d71
parent2a0bf1cd518969f13a6666c9705522f49dc72a4e (diff)
downloadimag-962b5fffd84bc8b919d369c2a8cf7d3efbfa616c.zip
imag-962b5fffd84bc8b919d369c2a8cf7d3efbfa616c.tar.gz
Remove unused imports/code
-rw-r--r--bin/domain/imag-wiki/src/main.rs18
1 files changed, 4 insertions, 14 deletions
diff --git a/bin/domain/imag-wiki/src/main.rs b/bin/domain/imag-wiki/src/main.rs
index f211fa1..5c393bc 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) {