diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-02-28 17:28:32 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-05-18 00:20:59 +0200 |
commit | 1d8984461395c37fdbcd59a0b9488b076084c89a (patch) | |
tree | b98795420280291c9dc2a9d56229b9af593f2bcb /bin/core | |
parent | 51daf28509b913a8159ad3a097304645db7e263f (diff) |
Run 'cargo fix' for rust-2018
With this patch we move the codebase to Rust-2018.
The diff was generated by executing
cargo fix --all --all-features --edition
on the codebase.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/core')
-rw-r--r-- | bin/core/imag-annotate/src/main.rs | 6 | ||||
-rw-r--r-- | bin/core/imag-category/src/main.rs | 4 | ||||
-rw-r--r-- | bin/core/imag-edit/src/main.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-gps/src/main.rs | 6 | ||||
-rw-r--r-- | bin/core/imag-header/src/main.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-ids/src/main.rs | 6 | ||||
-rw-r--r-- | bin/core/imag-link/src/main.rs | 8 | ||||
-rw-r--r-- | bin/core/imag-mv/src/main.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-ref/src/main.rs | 10 | ||||
-rw-r--r-- | bin/core/imag-store/src/create.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-store/src/delete.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-store/src/get.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-store/src/main.rs | 14 | ||||
-rw-r--r-- | bin/core/imag-store/src/update.rs | 2 | ||||
-rw-r--r-- | bin/core/imag-tag/src/main.rs | 4 | ||||
-rw-r--r-- | bin/core/imag-view/src/main.rs | 4 |
16 files changed, 38 insertions, 38 deletions
diff --git a/bin/core/imag-annotate/src/main.rs b/bin/core/imag-annotate/src/main.rs index ada33757..f4ad2093 100644 --- a/bin/core/imag-annotate/src/main.rs +++ b/bin/core/imag-annotate/src/main.rs @@ -97,7 +97,7 @@ fn main() { fn add(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("add").unwrap(); // safed by main() - let mut ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap().into_iter(); + let mut ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap().into_iter(); if let Some(first) = ids.next() { let mut annotation = rt.store() @@ -144,7 +144,7 @@ fn remove(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("remove").unwrap(); // safed by main() let annotation_name = scmd.value_of("annotation_name").unwrap(); // safed by clap let delete = scmd.is_present("delete-annotation"); - let ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); ids.into_iter().for_each(|id| { let mut entry = rt.store() @@ -181,7 +181,7 @@ fn remove(rt: &Runtime) { fn list(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("list").unwrap(); // safed by clap let with_text = scmd.is_present("list-with-text"); - let ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); if ids.len() != 0 { let _ = ids diff --git a/bin/core/imag-category/src/main.rs b/bin/core/imag-category/src/main.rs index 96882e41..9629da7f 100644 --- a/bin/core/imag-category/src/main.rs +++ b/bin/core/imag-category/src/main.rs @@ -92,7 +92,7 @@ fn main() { fn set(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("set").unwrap(); // safed by main() let name = scmd.value_of("set-name").map(String::from).unwrap(); // safed by clap - let sids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let sids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); StoreIdIterator::new(Box::new(sids.into_iter().map(Ok))) .into_get_iter(rt.store()) @@ -109,7 +109,7 @@ fn set(rt: &Runtime) { } fn get(rt: &Runtime) { - let sids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let sids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); let out = rt.stdout(); let mut outlock = out.lock(); diff --git a/bin/core/imag-edit/src/main.rs b/bin/core/imag-edit/src/main.rs index c0a97dd5..9f8263bb 100644 --- a/bin/core/imag-edit/src/main.rs +++ b/bin/core/imag-edit/src/main.rs @@ -63,7 +63,7 @@ fn main() { let edit_header = rt.cli().is_present("edit-header"); let edit_header_only = rt.cli().is_present("edit-header-only"); - let sids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let sids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); StoreIdIterator::new(Box::new(sids.into_iter().map(Ok))) .into_get_iter(rt.store()) diff --git a/bin/core/imag-gps/src/main.rs b/bin/core/imag-gps/src/main.rs index 6ca785d4..0b34605f 100644 --- a/bin/core/imag-gps/src/main.rs +++ b/bin/core/imag-gps/src/main.rs @@ -124,7 +124,7 @@ fn add(rt: &Runtime) { Coordinates::new(long, lati) }; - rt.ids::<::ui::PathProvider>() + rt.ids::<crate::ui::PathProvider>() .map_err_trace_exit_unwrap() .into_iter() .for_each(|id| { @@ -149,7 +149,7 @@ fn remove(rt: &Runtime) { .unwrap() .is_present("print-removed"); // safed by main() - rt.ids::<::ui::PathProvider>() + rt.ids::<crate::ui::PathProvider>() .map_err_trace_exit_unwrap() .into_iter() .for_each(|id| { @@ -179,7 +179,7 @@ fn remove(rt: &Runtime) { fn get(rt: &Runtime) { let mut stdout = rt.stdout(); - rt.ids::<::ui::PathProvider>() + rt.ids::<crate::ui::PathProvider>() .map_err_trace_exit_unwrap() .into_iter() .for_each(|id| { diff --git a/bin/core/imag-header/src/main.rs b/bin/core/imag-header/src/main.rs index 1ee8440c..3e7b01da 100644 --- a/bin/core/imag-header/src/main.rs +++ b/bin/core/imag-header/src/main.rs @@ -79,7 +79,7 @@ fn main() { trace!("list_output_with_ids = {:?}", list_output_with_ids ); trace!("list_output_with_ids_fmt = {:?}", list_output_with_ids_fmt); - let sids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let sids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); let iter = StoreIdIterator::new(Box::new(sids.into_iter().map(Ok))) .into_get_iter(rt.store()) diff --git a/bin/core/imag-ids/src/main.rs b/bin/core/imag-ids/src/main.rs index b0b84199..dbe271b2 100644 --- a/bin/core/imag-ids/src/main.rs +++ b/bin/core/imag-ids/src/main.rs @@ -65,8 +65,8 @@ use libimagerror::io::ToExitCode; mod id_filters; mod ui; -use ui::build_ui; -use id_filters::IsInCollectionsFilter; +use crate::ui::build_ui; +use crate::id_filters::IsInCollectionsFilter; fn main() { let version = make_imag_version!(); @@ -93,7 +93,7 @@ fn main() { let iterator = if rt.ids_from_stdin() { debug!("Fetching IDs from stdin..."); - let ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); Box::new(ids.into_iter().map(Ok)) as Box<Iterator<Item = Result<StoreId, _>>> } else { diff --git a/bin/core/imag-link/src/main.rs b/bin/core/imag-link/src/main.rs index fedda184..0255f341 100644 --- a/bin/core/imag-link/src/main.rs +++ b/bin/core/imag-link/src/main.rs @@ -79,7 +79,7 @@ use failure::Fallible as Result; mod ui; -use ui::build_ui; +use crate::ui::build_ui; fn main() { let version = make_imag_version!(); @@ -209,7 +209,7 @@ fn remove_linking(rt: &Runtime) { }) .unwrap(); - rt.ids::<::ui::PathProvider>() + rt.ids::<crate::ui::PathProvider>() .map_err_trace_exit_unwrap() .into_iter() .for_each(|id| match rt.store().get(id.clone()) { @@ -245,7 +245,7 @@ fn remove_linking(rt: &Runtime) { } fn unlink(rt: &Runtime) { - rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap().into_iter().for_each(|id| { + rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap().into_iter().for_each(|id| { rt.store() .get(id.clone()) .map_err_trace_exit_unwrap() @@ -271,7 +271,7 @@ fn list_linkings(rt: &Runtime) { let mut tab = ::prettytable::Table::new(); tab.set_titles(row!["#", "Link"]); - rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap().into_iter().for_each(|id| { + rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap().into_iter().for_each(|id| { match rt.store().get(id.clone()) { Ok(Some(entry)) => { for (i, link) in entry.get_internal_links().map_err_trace_exit_unwrap().enumerate() { diff --git a/bin/core/imag-mv/src/main.rs b/bin/core/imag-mv/src/main.rs index f5d4d341..9f2fde74 100644 --- a/bin/core/imag-mv/src/main.rs +++ b/bin/core/imag-mv/src/main.rs @@ -45,7 +45,7 @@ extern crate libimagentrylink; use std::process::exit; mod ui; -use ui::build_ui; +use crate::ui::build_ui; use std::path::PathBuf; diff --git a/bin/core/imag-ref/src/main.rs b/bin/core/imag-ref/src/main.rs index bd9f6ed6..197a530a 100644 --- a/bin/core/imag-ref/src/main.rs +++ b/bin/core/imag-ref/src/main.rs @@ -46,7 +46,7 @@ extern crate libimaginteraction; extern crate libimagutil; mod ui; -use ui::build_ui; +use crate::ui::build_ui; use std::process::exit; use std::io::Write; @@ -92,7 +92,7 @@ fn main() { fn deref(rt: &Runtime) { let cmd = rt.cli().subcommand_matches("deref").unwrap(); let basepath = cmd.value_of("override-basepath"); - let ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); let cfg = get_ref_config(&rt, "imag-ref").map_err_trace_exit_unwrap(); let out = rt.stdout(); let mut outlock = out.lock(); @@ -130,7 +130,7 @@ fn remove(rt: &Runtime) { let cmd = rt.cli().subcommand_matches("remove").unwrap(); let yes = cmd.is_present("yes"); - let ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); let mut input = rt.stdin().unwrap_or_else(|| { error!("No input stream. Cannot ask for permission"); @@ -169,7 +169,7 @@ fn list_dead(rt: &Runtime) { let list_id = cmd.is_present("list-dead-ids"); let mut output = rt.stdout(); - rt.ids::<::ui::PathProvider>() + rt.ids::<crate::ui::PathProvider>() .map_err_trace_exit_unwrap() .into_iter() .for_each(|id| { @@ -204,7 +204,7 @@ fn list_dead(rt: &Runtime) { }); } -fn create(rt: &Runtime) { +fn create(_rt: &Runtime) { unimplemented!() } diff --git a/bin/core/imag-store/src/create.rs b/bin/core/imag-store/src/create.rs index 8b6cc2e2..dcb5c686 100644 --- a/bin/core/imag-store/src/create.rs +++ b/bin/core/imag-store/src/create.rs @@ -35,7 +35,7 @@ use libimagerror::trace::MapErrTrace; use libimagerror::exit::ExitUnwrap; use libimagutil::debug_result::*; -use util::build_toml_header; +use crate::util::build_toml_header; pub fn create(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("create").unwrap(); diff --git a/bin/core/imag-store/src/delete.rs b/bin/core/imag-store/src/delete.rs index 50c73d97..c3a9a052 100644 --- a/bin/core/imag-store/src/delete.rs +++ b/bin/core/imag-store/src/delete.rs @@ -39,7 +39,7 @@ pub fn delete(rt: &Runtime) { #[cfg(test)] mod tests { - use create::create; + use crate::create::create; use super::delete; use std::path::PathBuf; diff --git a/bin/core/imag-store/src/get.rs b/bin/core/imag-store/src/get.rs index bf9a1eea..6885f594 100644 --- a/bin/core/imag-store/src/get.rs +++ b/bin/core/imag-store/src/get.rs @@ -24,7 +24,7 @@ use libimagerror::trace::MapErrTrace; use libimagerror::exit::ExitUnwrap; use libimagstore::storeid::StoreId; -use retrieve::print_entry; +use crate::retrieve::print_entry; pub fn get(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("get").unwrap(); diff --git a/bin/core/imag-store/src/main.rs b/bin/core/imag-store/src/main.rs index 7c0c0f10..6ba6ad98 100644 --- a/bin/core/imag-store/src/main.rs +++ b/bin/core/imag-store/src/main.rs @@ -65,13 +65,13 @@ mod util; use std::ops::Deref; -use create::create; -use delete::delete; -use get::get; -use retrieve::retrieve; -use ui::build_ui; -use update::update; -use verify::verify; +use crate::create::create; +use crate::delete::delete; +use crate::get::get; +use crate::retrieve::retrieve; +use crate::ui::build_ui; +use crate::update::update; +use crate::verify::verify; fn main() { let version = make_imag_version!(); diff --git a/bin/core/imag-store/src/update.rs b/bin/core/imag-store/src/update.rs index c2687973..4ce5ac44 100644 --- a/bin/core/imag-store/src/update.rs +++ b/bin/core/imag-store/src/update.rs @@ -25,7 +25,7 @@ use libimagerror::trace::MapErrTrace; use libimagerror::exit::ExitUnwrap; use libimagstore::storeid::StoreId; -use util::build_toml_header; +use crate::util::build_toml_header; pub fn update(rt: &Runtime) { let scmd = rt.cli().subcommand_matches("update").unwrap(); diff --git a/bin/core/imag-tag/src/main.rs b/bin/core/imag-tag/src/main.rs index e3ba7f20..9f1f9bf4 100644 --- a/bin/core/imag-tag/src/main.rs +++ b/bin/core/imag-tag/src/main.rs @@ -75,7 +75,7 @@ use clap::ArgMatches; mod ui; -use ui::build_ui; +use crate::ui::build_ui; fn main() { let version = make_imag_version!(); @@ -84,7 +84,7 @@ fn main() { "Direct interface to the store. Use with great care!", build_ui); - let ids = rt.ids::<::ui::PathProvider>().map_err_trace_exit_unwrap(); + let ids = rt.ids::<crate::ui::PathProvider>().map_err_trace_exit_unwrap(); rt.cli() .subcommand_name() diff --git a/bin/core/imag-view/src/main.rs b/bin/core/imag-view/src/main.rs index 1dca0c79..7ffe61b5 100644 --- a/bin/core/imag-view/src/main.rs +++ b/bin/core/imag-view/src/main.rs @@ -71,7 +71,7 @@ use libimagstore::iter::get::StoreIdGetIteratorExtension; use libimagstore::store::FileLockEntry; mod ui; -use ui::build_ui; +use crate::ui::build_ui; fn main() { let version = make_imag_version!(); @@ -82,7 +82,7 @@ fn main() { let view_header = rt.cli().is_present("view-header"); let hide_content = rt.cli().is_present("not-view-content"); - let entries = rt.ids::<::ui::PathProvider>() + let entries = rt.ids::<crate::ui::PathProvider>() .map_err_trace_exit_unwrap() .into_iter() .map(Ok) |