diff --git a/bin/core/imag-store/src/dump.rs b/bin/core/imag-store/src/dump.rs deleted file mode 100644 index 0de05e24..00000000 --- a/bin/core/imag-store/src/dump.rs +++ /dev/null @@ -1,39 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015-2018 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::process::exit; - -use libimagrt::runtime::Runtime; -use libimagerror::trace::*; - -pub fn dump(rt: &mut Runtime) { - rt.store() - .entries() - .map_err_trace_exit_unwrap(1) - .for_each(|elem| { - debug!("Working on {:?}", elem); - rt.store().get(elem).map_err_trace_exit_unwrap(1); - }); - - if let Err(_) = rt.store_backend_to_stdout().map_err_trace() { - error!("Loading Store IO backend failed"); - exit(1); - } -} - diff --git a/bin/core/imag-store/src/main.rs b/bin/core/imag-store/src/main.rs index 64297a67..6a907965 100644 --- a/bin/core/imag-store/src/main.rs +++ b/bin/core/imag-store/src/main.rs @@ -54,7 +54,6 @@ use libimagerror::trace::MapErrTrace; mod create; mod delete; -mod dump; mod error; mod get; mod retrieve; @@ -67,7 +66,6 @@ use std::ops::Deref; use create::create; use delete::delete; -use dump::dump; use get::get; use retrieve::retrieve; use ui::build_ui; @@ -76,10 +74,10 @@ use verify::verify; fn main() { let version = make_imag_version!(); - let mut rt = generate_runtime_setup("imag-store", - &version, - "Direct interface to the store. Use with great care!", - build_ui); + let rt = generate_runtime_setup("imag-store", + &version, + "Direct interface to the store. Use with great care!", + build_ui); let command = rt.cli().subcommand_name().map(String::from); @@ -92,7 +90,6 @@ fn main() { "retrieve" => retrieve(&rt), "update" => update(&rt), "verify" => verify(&rt), - "dump" => dump(&mut rt), other => { debug!("Unknown command"); let _ = rt.handle_unknown_subcommand("imag-store", other, rt.cli()) diff --git a/bin/core/imag-store/src/ui.rs b/bin/core/imag-store/src/ui.rs index b44665b7..693f5605 100644 --- a/bin/core/imag-store/src/ui.rs +++ b/bin/core/imag-store/src/ui.rs @@ -190,9 +190,4 @@ pub fn build_ui<'a>(app: App<'a, 'a>) -> App<'a, 'a> { .about("Verify the store") .version("0.1") ) - - .subcommand(SubCommand::with_name("dump") - .about("Dump the complete store to stdout. Currently does only support JSON") - .version("0.1") - ) }