summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-02-28 17:28:32 +0100
committerMatthias Beyer <mail@beyermatthias.de>2019-05-18 00:20:59 +0200
commit1d8984461395c37fdbcd59a0b9488b076084c89a (patch)
treeb98795420280291c9dc2a9d56229b9af593f2bcb
parent51daf28509b913a8159ad3a097304645db7e263f (diff)
downloadimag-1d8984461395c37fdbcd59a0b9488b076084c89a.zip
imag-1d8984461395c37fdbcd59a0b9488b076084c89a.tar.gz
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>
-rw-r--r--bin/core/imag-annotate/src/main.rs6
-rw-r--r--bin/core/imag-category/src/main.rs4
-rw-r--r--bin/core/imag-edit/src/main.rs2
-rw-r--r--bin/core/imag-gps/src/main.rs6
-rw-r--r--bin/core/imag-header/src/main.rs2
-rw-r--r--bin/core/imag-ids/src/main.rs6
-rw-r--r--bin/core/imag-link/src/main.rs8
-rw-r--r--bin/core/imag-mv/src/main.rs2
-rw-r--r--bin/core/imag-ref/src/main.rs10
-rw-r--r--bin/core/imag-store/src/create.rs2
-rw-r--r--bin/core/imag-store/src/delete.rs2
-rw-r--r--bin/core/imag-store/src/get.rs2
-rw-r--r--bin/core/imag-store/src/main.rs14
-rw-r--r--bin/core/imag-store/src/update.rs2
-rw-r--r--bin/core/imag-tag/src/main.rs4
-rw-r--r--bin/core/imag-view/src/main.rs4
-rw-r--r--bin/domain/imag-bookmark/src/main.rs2
-rw-r--r--bin/domain/imag-contact/src/edit.rs2
-rw-r--r--bin/domain/imag-contact/src/main.rs8
-rw-r--r--bin/domain/imag-diary/src/create.rs8
-rw-r--r--bin/domain/imag-diary/src/delete.rs2
-rw-r--r--bin/domain/imag-diary/src/list.rs2
-rw-r--r--bin/domain/imag-diary/src/main.rs8
-rw-r--r--bin/domain/imag-diary/src/view.rs2
-rw-r--r--bin/domain/imag-log/src/main.rs2
-rw-r--r--bin/domain/imag-mail/src/main.rs4
-rw-r--r--bin/domain/imag-notes/src/main.rs2
-rw-r--r--bin/domain/imag-timetrack/src/main.rs20
-rw-r--r--bin/domain/imag-todo/src/main.rs2
-rw-r--r--bin/domain/imag-wiki/src/main.rs2
-rw-r--r--lib/core/libimagerror/src/io.rs4
-rw-r--r--lib/core/libimagerror/src/iter.rs4
-rw-r--r--lib/core/libimagrt/src/logger.rs2
-rw-r--r--lib/core/libimagrt/src/runtime.rs8
-rw-r--r--lib/core/libimagrt/src/setup.rs2
-rw-r--r--lib/core/libimagstore/src/configuration.rs2
-rw-r--r--lib/core/libimagstore/src/file_abstraction/fs.rs8
-rw-r--r--lib/core/libimagstore/src/file_abstraction/inmemory.rs8
-rw-r--r--lib/core/libimagstore/src/file_abstraction/iter.rs4
-rw-r--r--lib/core/libimagstore/src/file_abstraction/mod.rs12
-rw-r--r--lib/core/libimagstore/src/iter.rs28
-rw-r--r--lib/core/libimagstore/src/store.rs32
-rw-r--r--lib/core/libimagstore/src/storeid.rs14
-rw-r--r--lib/domain/libimagbookmark/src/collection.rs16
-rw-r--r--lib/domain/libimagcontact/src/contact.rs2
-rw-r--r--lib/domain/libimagcontact/src/iter.rs2
-rw-r--r--lib/domain/libimagcontact/src/store.rs8
-rw-r--r--lib/domain/libimagdiary/src/diary.rs10
-rw-r--r--lib/domain/libimagdiary/src/diaryid.rs4
-rw-r--r--lib/domain/libimagdiary/src/entry.rs4
-rw-r--r--lib/domain/libimagdiary/src/iter.rs2
-rw-r--r--lib/domain/libimagdiary/src/viewer.rs2
-rw-r--r--lib/domain/libimaghabit/src/habit.rs22
-rw-r--r--lib/domain/libimaghabit/src/instance.rs2
-rw-r--r--lib/domain/libimaghabit/src/iter.rs2
-rw-r--r--lib/domain/libimaghabit/src/store.rs6
-rw-r--r--lib/domain/libimaghabit/src/util.rs4
-rw-r--r--lib/domain/libimagmail/src/hasher.rs2
-rw-r--r--lib/domain/libimagmail/src/mail.rs4
-rw-r--r--lib/domain/libimagmail/src/store.rs14
-rw-r--r--lib/domain/libimagnotes/src/iter.rs2
-rw-r--r--lib/domain/libimagnotes/src/notestore.rs10
-rw-r--r--lib/domain/libimagtimetrack/src/iter/create.rs6
-rw-r--r--lib/domain/libimagtimetrack/src/iter/filter.rs8
-rw-r--r--lib/domain/libimagtimetrack/src/iter/get.rs2
-rw-r--r--lib/domain/libimagtimetrack/src/iter/setendtime.rs4
-rw-r--r--lib/domain/libimagtimetrack/src/iter/storeid.rs8
-rw-r--r--lib/domain/libimagtimetrack/src/iter/tag.rs4
-rw-r--r--lib/domain/libimagtimetrack/src/timetracking.rs4
-rw-r--r--lib/domain/libimagtimetrack/src/timetrackingstore.rs6
-rw-r--r--lib/domain/libimagtodo/src/taskstore.rs8
-rw-r--r--lib/domain/libimagwiki/src/store.rs4
-rw-r--r--lib/domain/libimagwiki/src/wiki.rs12
-rw-r--r--lib/entry/libimagentryannotation/src/annotateable.rs4
-rw-r--r--lib/entry/libimagentrycategory/src/category.rs4
-rw-r--r--lib/entry/libimagentrycategory/src/entry.rs2
-rw-r--r--lib/entry/libimagentrycategory/src/iter.rs4
-rw-r--r--lib/entry/libimagentrycategory/src/store.rs8
-rw-r--r--lib/entry/libimagentrydatetime/src/datepath/compiler.rs8
-rw-r--r--lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs2
-rw-r--r--lib/entry/libimagentrydatetime/src/datetime.rs2
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_eq.rs6
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_exists.rs2
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_grep.rs6
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_gt.rs6
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_isempty.rs2
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_istype.rs6
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_lt.rs6
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/field_predicate.rs4
-rw-r--r--lib/entry/libimagentryfilter/src/builtin/header/version/range.rs4
-rw-r--r--lib/entry/libimagentrygps/src/entry.rs4
-rw-r--r--lib/entry/libimagentrylink/src/external.rs10
-rw-r--r--lib/entry/libimagentrylink/src/internal.rs2
-rw-r--r--lib/entry/libimagentrymarkdown/src/processor.rs2
-rw-r--r--lib/entry/libimagentryref/src/hasher.rs2
-rw-r--r--lib/entry/libimagentryref/src/reference.rs8
-rw-r--r--lib/entry/libimagentryref/src/util.rs2
-rw-r--r--lib/entry/libimagentrytag/src/tagable.rs4
-rw-r--r--lib/entry/libimagentryview/src/builtin/editor.rs2
-rw-r--r--lib/entry/libimagentryview/src/builtin/md.rs2
-rw-r--r--lib/entry/libimagentryview/src/builtin/plain.rs2
-rw-r--r--lib/entry/libimagentryview/src/builtin/stdout.rs2
-rw-r--r--lib/etc/libimagtimeui/src/date.rs6
-rw-r--r--lib/etc/libimagtimeui/src/datetime.rs6
-rw-r--r--lib/etc/libimagtimeui/src/time.rs6
105 files changed, 295 insertions, 295 deletions
diff --git a/bin/core/imag-annotate/src/main.rs b/bin/core/imag-annotate/src/main.rs
index ada3375..f4ad209 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 96882e4..9629da7 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 c0a97dd..9f8263b 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 6ca785d..0b34605 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 1ee8440..3e7b01d 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 b0b8419..dbe271b 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 fedda18..0255f34 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 f5d4d34..9f2fde7 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 bd9f6ed..197a530 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 8b6cc2e..dcb5c68 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 50c73d9..c3a9a05 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 bf9a1ee..6885f59 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 7c0c0f1..6ba6ad9 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 c268797..4ce5ac4 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 e3ba7f2..9f1f9bf 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 1dca0c7..7ffe61b 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)
diff --git a/bin/domain/imag-bookmark/src/main.rs b/bin/domain/imag-bookmark/src/main.rs
index c7b942c..90a9897 100644
--- a/bin/domain/imag-bookmark/src/main.rs
+++ b/bin/domain/imag-bookmark/src/main.rs
@@ -63,7 +63,7 @@ use libimagutil::debug_result::DebugResult;
mod ui;
-use ui::build_ui;
+use crate::ui::build_ui;
fn main() {
let version = make_imag_version!();
diff --git a/bin/domain/imag-contact/src/edit.rs b/bin/domain/imag-contact/src/edit.rs
index bcb8990..1c7a2ae 100644
--- a/bin/domain/imag-contact/src/edit.rs
+++ b/bin/domain/imag-contact/src/edit.rs
@@ -68,7 +68,7 @@ pub fn edit(rt: &Runtime) {
exit(1)
});
- ::util::find_contact_by_hash(rt, hash)
+ crate::util::find_contact_by_hash(rt, hash)
.for_each(|contact| {
loop {
let res = edit_contact(&rt, &contact, &ref_config, collection_name, force_override);
diff --git a/bin/domain/imag-contact/src/main.rs b/bin/domain/imag-contact/src/main.rs
index 324d41a..bf472bb 100644
--- a/bin/domain/imag-contact/src/main.rs
+++ b/bin/domain/imag-contact/src/main.rs
@@ -82,10 +82,10 @@ mod util;
mod create;
mod edit;
-use ui::build_ui;
-use util::build_data_object_for_handlebars;
-use create::create;
-use edit::edit;
+use crate::ui::build_ui;
+use crate::util::build_data_object_for_handlebars;
+use crate::create::create;
+use crate::edit::edit;
fn main() {
let version = make_imag_version!();
diff --git a/bin/domain/imag-diary/src/create.rs b/bin/domain/imag-diary/src/create.rs
index 423a701..af6d7fe 100644
--- a/bin/domain/imag-diary/src/create.rs
+++ b/bin/domain/imag-diary/src/create.rs
@@ -36,9 +36,9 @@ use libimagutil::debug_option::DebugOption;
use libimagstore::store::FileLockEntry;
use libimagstore::store::Store;
-use util::get_diary_name;
-use util::get_diary_timed_config;
-use util::Timed;
+use crate::util::get_diary_name;
+use crate::util::get_diary_timed_config;
+use crate::util::Timed;
pub fn create(rt: &Runtime) {
let diaryname = get_diary_name(rt)
@@ -61,7 +61,7 @@ pub fn create(rt: &Runtime) {
}
fn create_entry<'a>(diary: &'a Store, diaryname: &str, rt: &Runtime) -> FileLockEntry<'a> {
- use util::parse_timed_string;
+ use crate::util::parse_timed_string;
let create = rt.cli().subcommand_matches("create").unwrap();
diff --git a/bin/domain/imag-diary/src/delete.rs b/bin/domain/imag-diary/src/delete.rs
index 1230180..9de6568 100644
--- a/bin/domain/imag-diary/src/delete.rs
+++ b/bin/domain/imag-diary/src/delete.rs
@@ -30,7 +30,7 @@ use libimagstore::storeid::IntoStoreId;
use libimagerror::trace::MapErrTrace;
use libimagerror::exit::ExitUnwrap;
-use util::get_diary_name;
+use crate::util::get_diary_name;
pub fn delete(rt: &Runtime) {
use libimaginteraction::ask::ask_bool;
diff --git a/bin/domain/imag-diary/src/list.rs b/bin/domain/imag-diary/src/list.rs
index b551bd1..3d07f6f 100644
--- a/bin/domain/imag-diary/src/list.rs
+++ b/bin/domain/imag-diary/src/list.rs
@@ -33,7 +33,7 @@ use libimagstore::storeid::IntoStoreId;
use failure::Fallible as Result;
-use util::get_diary_name;
+use crate::util::get_diary_name;
pub fn list(rt: &Runtime) {
let diaryname = get_diary_name(rt)
diff --git a/bin/domain/imag-diary/src/main.rs b/bin/domain/imag-diary/src/main.rs
index 055911c..cf5c3fd 100644
--- a/bin/domain/imag-diary/src/main.rs
+++ b/bin/domain/imag-diary/src/main.rs
@@ -67,10 +67,10 @@ mod ui;
mod util;
mod view;
-use create::create;
-use delete::delete;
-use list::list;
-use view::view;
+use crate::create::create;
+use crate::delete::delete;
+use crate::list::list;
+use crate::view::view;
fn main() {
let version = make_imag_version!();
diff --git a/bin/domain/imag-diary/src/view.rs b/bin/domain/imag-diary/src/view.rs
index 9f0acba..9acab80 100644
--- a/bin/domain/imag-diary/src/view.rs
+++ b/bin/domain/imag-diary/src/view.rs
@@ -27,7 +27,7 @@ use libimagutil::warn_exit::warn_exit;
use libimagstore::iter::get::StoreIdGetIteratorExtension;
use libimagentryview::viewer::Viewer;
-use util::get_diary_name;
+use crate::util::get_diary_name;
pub fn view(rt: &Runtime) {
let diaryname = get_diary_name(rt).unwrap_or_else(|| warn_exit("No diary name", 1));
diff --git a/bin/domain/imag-log/src/main.rs b/bin/domain/imag-log/src/main.rs
index 6110dd9..3ecd492 100644
--- a/bin/domain/imag-log/src/main.rs
+++ b/bin/domain/imag-log/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;
use toml::Value;
use itertools::Itertools;
diff --git a/bin/domain/imag-mail/src/main.rs b/bin/domain/imag-mail/src/main.rs
index 8f7418d..bd6cf9a 100644
--- a/bin/domain/imag-mail/src/main.rs
+++ b/bin/domain/imag-mail/src/main.rs
@@ -71,7 +71,7 @@ use libimagstore::iter::get::StoreIdGetIteratorExtension;
mod ui;
-use ui::build_ui;
+use crate::ui::build_ui;
fn main() {
let version = make_imag_version!();
@@ -215,7 +215,7 @@ fn list(rt: &Runtime) {
}
if rt.ids_from_stdin() {
- let iter = rt.ids::<::ui::PathProvider>()
+ let iter = rt.ids::<crate::ui::PathProvider>()
.map_err_trace_exit_unwrap()
.into_iter()
.map(Ok);
diff --git a/bin/domain/imag-notes/src/main.rs b/bin/domain/imag-notes/src/main.rs
index 3d7be38..5c06a4b 100644
--- a/bin/domain/imag-notes/src/main.rs
+++ b/bin/domain/imag-notes/src/main.rs
@@ -65,7 +65,7 @@ use libimagutil::warn_result::WarnResult;
mod ui;
-use ui::build_ui;
+use crate::ui::build_ui;
fn main() {
let version = make_imag_version!();
diff --git a/bin/domain/imag-timetrack/src/main.rs b/bin/domain/imag-timetrack/src/main.rs
index af7f141..2862b6d 100644
--- a/bin/domain/imag-timetrack/src/main.rs
+++ b/bin/domain/imag-timetrack/src/main.rs
@@ -62,16 +62,16 @@ mod ui;
mod week;
mod year;
-use cont::cont;
-use day::day;
-use list::{list, list_impl};
-use month::month;
-use start::start;
-use stop::stop;
-use track::track;
-use ui::build_ui;
-use week::week;
-use year::year;
+use crate::cont::cont;
+use crate::day::day;
+use crate::list::{list, list_impl};
+use crate::month::month;
+use crate::start::start;
+use crate::stop::stop;
+use crate::track::track;
+use crate::ui::build_ui;
+use crate::week::week;
+use crate::year::year;
use libimagrt::setup::generate_runtime_setup;
use libimagerror::trace::MapErrTrace;
diff --git a/bin/domain/imag-todo/src/main.rs b/bin/domain/imag-todo/src/main.rs
index d62eabb..3a2eb55 100644
--- a/bin/domain/imag-todo/src/main.rs
+++ b/bin/domain/imag-todo/src/main.rs
@@ -60,7 +60,7 @@ use libimagerror::io::ToExitCode;
mod ui;
-use ui::build_ui;
+use crate::ui::build_ui;
fn main() {
let version = make_imag_version!();
let rt = generate_runtime_setup("imag-todo",
diff --git a/bin/domain/imag-wiki/src/main.rs b/bin/domain/imag-wiki/src/main.rs
index 17f0825..1556abb 100644
--- a/bin/domain/imag-wiki/src/main.rs
+++ b/bin/domain/imag-wiki/src/main.rs
@@ -44,7 +44,7 @@ use libimagwiki::store::WikiStore;
use libimagentryedit::edit::{Edit, EditHeader};
mod ui;
-use ui::build_ui;
+use crate::ui::build_ui;
fn main() {
let version = make_imag_version!();
diff --git a/lib/core/libimagerror/src/io.rs b/lib/core/libimagerror/src/io.rs
index 3894048..d8abf0b 100644
--- a/lib/core/libimagerror/src/io.rs
+++ b/lib/core/libimagerror/src/io.rs
@@ -19,7 +19,7 @@
use std::io::ErrorKind;
-use exit::ExitCode;
+use crate::exit::ExitCode;
pub enum Settings {
Ignore(ErrorKind),
@@ -28,7 +28,7 @@ pub enum Settings {
pub trait ToExitCode<T> {
fn to_exit_code(self) -> Result<T, ExitCode>;
- fn to_exit_code_with(self, Settings) -> Result<T, ExitCode>;
+ fn to_exit_code_with(self, _: Settings) -> Result<T, ExitCode>;
}
impl<T> ToExitCode<T> for Result<T, ::std::io::Error> {
diff --git a/lib/core/libimagerror/src/iter.rs b/lib/core/libimagerror/src/iter.rs
index e5cf712..5a28832 100644
--- a/lib/core/libimagerror/src/iter.rs
+++ b/lib/core/libimagerror/src/iter.rs
@@ -62,7 +62,7 @@ impl<I, T> Iterator for UnwrapExit<I, T>
type Item = T;
fn next(&mut self) -> Option<Self::Item> {
- use trace::MapErrTrace;
+ use crate::trace::MapErrTrace;
self.0.next().map(|e| e.map_err_trace_exit_unwrap())
}
}
@@ -71,7 +71,7 @@ impl<I, T> DoubleEndedIterator for UnwrapExit<I, T>
where I: DoubleEndedIterator<Item = Result<T, Error>>,
{
fn next_back(&mut self) -> Option<Self::Item> {
- use trace::MapErrTrace;
+ use crate::trace::MapErrTrace;
self.0.next_back().map(|e| e.map_err_trace_exit_unwrap())
}
}
diff --git a/lib/core/libimagrt/src/logger.rs b/lib/core/libimagrt/src/logger.rs
index 585f285..3090fb3 100644
--- a/lib/core/libimagrt/src/logger.rs
+++ b/lib/core/libimagrt/src/logger.rs
@@ -24,7 +24,7 @@ use std::sync::Arc;
use std::sync::Mutex;
use std::ops::Deref;
-use runtime::Runtime;
+use crate::runtime::Runtime;
use failure::ResultExt;
use failure::Fallible as Result;
diff --git a/lib/core/libimagrt/src/runtime.rs b/lib/core/libimagrt/src/runtime.rs
index 6eadc12..a4cba80 100644
--- a/lib/core/libimagrt/src/runtime.rs
+++ b/lib/core/libimagrt/src/runtime.rs
@@ -37,9 +37,9 @@ use failure::Fallible as Result;
use failure::Error;
use failure::err_msg;
-use configuration::{fetch_config, override_config, InternalConfiguration};
-use logger::ImagLogger;
-use io::OutputProxy;
+use crate::configuration::{fetch_config, override_config, InternalConfiguration};
+use crate::logger::ImagLogger;
+use crate::io::OutputProxy;
use libimagerror::exit::ExitCode;
use libimagerror::errors::ErrorMsg as EM;
@@ -48,7 +48,7 @@ use libimagerror::io::ToExitCode;
use libimagstore::store::Store;
use libimagstore::storeid::StoreId;
use libimagutil::debug_result::DebugResult;
-use spec::CliSpec;
+use crate::spec::CliSpec;
use atty;
/// The Runtime object
diff --git a/lib/core/libimagrt/src/setup.rs b/lib/core/libimagrt/src/setup.rs
index 6a6a918..f226d9e 100644
--- a/lib/core/libimagrt/src/setup.rs
+++ b/lib/core/libimagrt/src/setup.rs
@@ -19,7 +19,7 @@
use clap::App;
-use runtime::Runtime;
+use crate::runtime::Runtime;
pub type Name = &'static str;
pub type Version<'a> = &'a str;
diff --git a/lib/core/libimagstore/src/configuration.rs b/lib/core/libimagstore/src/configuration.rs
index 6a8beb8..d0b3452 100644
--- a/lib/core/libimagstore/src/configuration.rs
+++ b/lib/core/libimagstore/src/configuration.rs
@@ -45,7 +45,7 @@ pub fn config_implicit_store_create_allowed(config: &Option<Value>) -> Result<bo
#[cfg(test)]
mod tests {
use toml::de::from_str as toml_from_str;
- use configuration::*;
+ use crate::configuration::*;
#[test]
fn test_implicit_store_create_allowed_no_toml() {
diff --git a/lib/core/libimagstore/src/file_abstraction/fs.rs b/lib/core/libimagstore/src/file_abstraction/fs.rs
index 904e81d..5d960bd 100644
--- a/lib/core/libimagstore/src/file_abstraction/fs.rs
+++ b/lib/core/libimagstore/src/file_abstraction/fs.rs
@@ -27,10 +27,10 @@ use libimagerror::errors::ErrorMsg as EM;
use super::FileAbstraction;
use super::FileAbstractionInstance;
use super::Drain;
-use store::Entry;
-use storeid::StoreIdWithBase;
-use file_abstraction::iter::PathIterator;
-use file_abstraction::iter::PathIterBuilder;
+use crate::store::Entry;
+use crate::storeid::StoreIdWithBase;
+use crate::file_abstraction::iter::PathIterator;
+use crate::file_abstraction::iter::PathIterBuilder;
use walkdir::WalkDir;
use failure::ResultExt;
diff --git a/lib/core/libimagstore/src/file_abstraction/inmemory.rs b/lib/core/libimagstore/src/file_abstraction/inmemory.rs
index 603f4db..1342872 100644
--- a/lib/core/libimagstore/src/file_abstraction/inmemory.rs
+++ b/lib/core/libimagstore/src/file_abstraction/inmemory.rs
@@ -32,10 +32,10 @@ use failure::Error;
use super::FileAbstraction;
use super::FileAbstractionInstance;
use super::Drain;
-use store::Entry;
-use storeid::StoreIdWithBase;
-use file_abstraction::iter::PathIterator;
-use file_abstraction::iter::PathIterBuilder;
+use crate::store::Entry;
+use crate::storeid::StoreIdWithBase;
+use crate::file_abstraction::iter::PathIterator;
+use crate::file_abstraction::iter::PathIterBuilder;
type Backend = Arc<Mutex<RefCell<HashMap<PathBuf, Entry>>>>;
diff --git a/lib/core/libimagstore/src/file_abstraction/iter.rs b/lib/core/libimagstore/src/file_abstraction/iter.rs
index 6bd476a..c15949d 100644
--- a/lib/core/libimagstore/src/file_abstraction/iter.rs
+++ b/lib/core/libimagstore/src/file_abstraction/iter.rs
@@ -23,8 +23,8 @@ use std::fmt::Debug;
use failure::Fallible as Result;
-use storeid::StoreIdWithBase;
-use file_abstraction::FileAbstraction;
+use crate::storeid::StoreIdWithBase;
+use crate::file_abstraction::FileAbstraction;
/// See documentation for PathIterator
pub(crate) trait PathIterBuilder : Debug {
diff --git a/lib/core/libimagstore/src/file_abstraction/mod.rs b/lib/core/libimagstore/src/file_abstraction/mod.rs
index 9a80293..a8fbf40 100644
--- a/lib/core/libimagstore/src/file_abstraction/mod.rs
+++ b/lib/core/libimagstore/src/file_abstraction/mod.rs
@@ -24,8 +24,8 @@ use std::sync::Arc;
use failure::Fallible as Result;
-use store::Entry;
-use storeid::StoreIdWithBase;
+use crate::store::Entry;
+use crate::storeid::StoreIdWithBase;
pub mod fs;
pub mod inmemory;
@@ -40,8 +40,8 @@ pub(crate) trait FileAbstraction : Debug {
fn rename(&self, from: &PathBuf, to: &PathBuf) -> Result<()>;
fn create_dir_all(&self, _: &PathBuf) -> Result<()>;
- fn exists(&self, &PathBuf) -> Result<bool>;
- fn is_file(&self, &PathBuf) -> Result<bool>;
+ fn exists(&self, _: &PathBuf) -> Result<bool>;
+ fn is_file(&self, _: &PathBuf) -> Result<bool>;
fn new_instance(&self, p: PathBuf) -> Box<FileAbstractionInstance>;
@@ -97,8 +97,8 @@ mod test {
use super::FileAbstractionInstance;
use super::inmemory::InMemoryFileAbstraction;
use super::inmemory::InMemoryFileAbstractionInstance;
- use storeid::StoreIdWithBase;
- use store::Entry;
+ use crate::storeid::StoreIdWithBase;
+ use crate::store::Entry;
#[test]
fn lazy_file() {
diff --git a/lib/core/libimagstore/src/iter.rs b/lib/core/libimagstore/src/iter.rs
index 1aba5a5..4e66fb6 100644
--- a/lib/core/libimagstore/src/iter.rs
+++ b/lib/core/libimagstore/src/iter.rs
@@ -27,10 +27,10 @@ macro_rules! mk_iterator_mod {
fun = $fun:expr
} => {
pub mod $modname {
- use storeid::StoreId;
+ use crate::storeid::StoreId;
#[allow(unused_imports)]
- use store::FileLockEntry;
- use store::Store;
+ use crate::store::FileLockEntry;
+ use crate::store::Store;
use failure::Fallible as Result;
pub struct $itername<'a>(Box<Iterator<Item = Result<StoreId>> + 'a>, &'a Store);
@@ -109,8 +109,8 @@ mod compile_test {
// This module contains code to check whether this actually compiles the way we would like it to
// compile
- use store::Store;
- use storeid::StoreId;
+ use crate::store::Store;
+ use crate::storeid::StoreId;
fn store() -> Store {
unimplemented!("Not implemented because in compile-test")
@@ -137,13 +137,13 @@ mod compile_test {
}
}
-use storeid::StoreId;
-use storeid::StoreIdIterator;
+use crate::storeid::StoreId;
+use crate::storeid::StoreIdIterator;
use self::delete::StoreDeleteIterator;
use self::get::StoreGetIterator;
use self::retrieve::StoreRetrieveIterator;
-use file_abstraction::iter::PathIterator;
-use store::Store;
+use crate::file_abstraction::iter::PathIterator;
+use crate::store::Store;
use failure::Fallible as Result;
/// Iterator for iterating over all (or a subset of all) entries
@@ -186,8 +186,8 @@ impl<'a> Entries<'a> {
/// Revisit whether this can be done in a cleaner way. See commit message for why this is
/// needed.
pub fn into_storeid_iter(self) -> StoreIdIterator {
- use storeid::StoreIdWithBase;
- use storeid::IntoStoreId;
+ use crate::storeid::StoreIdWithBase;
+ use crate::storeid::IntoStoreId;
let storepath = self.1.path().to_path_buf();
@@ -243,9 +243,9 @@ mod tests {
let _ = env_logger::try_init();
}
- use store::Store;
- use storeid::StoreId;
- use file_abstraction::inmemory::InMemoryFileAbstraction;
+ use crate::store::Store;
+ use crate::storeid::StoreId;
+ use crate::file_abstraction::inmemory::InMemoryFileAbstraction;
use libimagutil::variants::generate_variants;
pub fn get_store() -> Store {
diff --git a/lib/core/libimagstore/src/store.rs b/lib/core/libimagstore/src/store.rs
index 3cd0bfe..8c45fa4 100644
--- a/lib/core/libimagstore/src/store.rs
+++ b/lib/core/libimagstore/src/store.rs
@@ -41,12 +41,12 @@ use failure::ResultExt;
use failure::err_msg;
use failure::Error;
-use storeid::{IntoStoreId, StoreId};
-use iter::Entries;
-use file_abstraction::FileAbstraction;
-use file_abstraction::FileAbstractionInstance;
-use file_abstraction::fs::FSFileAbstraction;
-use file_abstraction::inmemory::InMemoryFileAbstraction;
+use crate::storeid::{IntoStoreId, StoreId};
+use crate::iter::Entries;
+use crate::file_abstraction::FileAbstraction;
+use crate::file_abstraction::FileAbstractionInstance;
+use crate::file_abstraction::fs::FSFileAbstraction;
+use crate::file_abstraction::inmemory::InMemoryFileAbstraction;
use libimagutil::debug_result::*;
@@ -188,7 +188,7 @@ impl Store {
pub(crate) fn new_with_backend(location: PathBuf,
store_config: &Option<Value>,
backend: Arc<FileAbstraction>) -> Result<Store> {
- use configuration::*;
+ use crate::configuration::*;
debug!("Building new Store object");
if !location.exists() {
@@ -813,7 +813,7 @@ impl Entry {
/// - Header cannot be parsed into a TOML object
///
pub fn from_str<S: IntoStoreId>(loc: S, s: &str) -> Result<Entry> {
- use util::entry_buffer_to_header_content;
+ use crate::util::entry_buffer_to_header_content;
let (header, content) = entry_buffer_to_header_content(s)?;
@@ -865,7 +865,7 @@ impl Entry {
///
/// If an error is returned, the contents of neither the header nor the content are modified.
pub fn replace_from_buffer(&mut self, buf: &str) -> Result<()> {
- let (header, content) = ::util::entry_buffer_to_header_content(buf)?;
+ let (header, content) = crate::util::entry_buffer_to_header_content(buf)?;
self.content = content;
self.header = header;
Ok(())
@@ -931,9 +931,9 @@ mod test {
extern crate env_logger;
use std::collections::BTreeMap;
- use storeid::StoreId;
- use store::has_main_section;
- use store::has_imag_version_in_main_section;
+ use crate::storeid::StoreId;
+ use crate::store::has_main_section;
+ use crate::store::has_imag_version_in_main_section;
use toml::Value;
@@ -1058,7 +1058,7 @@ mod store_tests {
use super::Store;
pub fn get_store() -> Store {
- use file_abstraction::inmemory::InMemoryFileAbstraction;
+ use crate::file_abstraction::inmemory::InMemoryFileAbstraction;
let backend = Arc::new(InMemoryFileAbstraction::default());
Store::new_with_backend(PathBuf::from("/"), &None, backend).unwrap()
}
@@ -1141,7 +1141,7 @@ mod store_tests {
#[test]
fn test_store_create_in_hm() {
- use storeid::StoreId;
+ use crate::storeid::StoreId;
let store = get_store();
@@ -1156,7 +1156,7 @@ mod store_tests {
#[test]
fn test_store_retrieve_in_hm() {
- use storeid::StoreId;
+ use crate::storeid::StoreId;
let store = get_store();
@@ -1195,7 +1195,7 @@ mod store_tests {
#[test]
fn test_store_move_moves_in_hm() {
- use storeid::StoreId;
+ use crate::storeid::StoreId;
setup_logging();
let store = get_store();
diff --git a/lib/core/libimagstore/src/storeid.rs b/lib/core/libimagstore/src/storeid.rs
index 56177ea..2c504f2 100644
--- a/lib/core/libimagstore/src/storeid.rs
+++ b/lib/core/libimagstore/src/storeid.rs
@@ -31,12 +31,12 @@ use failure::Fallible as Result;
use failure::err_msg;
use failure::Error;
-use store::Store;
+use crate::store::Store;
-use iter::create::StoreCreateIterator;
-use iter::delete::StoreDeleteIterator;
-use iter::get::StoreGetIterator;
-use iter::retrieve::StoreRetrieveIterator;
+use crate::iter::create::StoreCreateIterator;
+use crate::iter::delete::StoreDeleteIterator;
+use crate::iter::get::StoreGetIterator;
+use crate::iter::retrieve::StoreRetrieveIterator;
/// The Index into the Store
///
@@ -344,14 +344,14 @@ mod test {
#[test]
fn test_correct_path() {
- let p = ::storeid::test::module_path::new_id("test");
+ let p = crate::storeid::test::module_path::new_id("test");
assert_eq!(p.unwrap().to_str().unwrap(), "test/test");
}
#[test]
fn storeid_in_collection() {
- let p = ::storeid::test::module_path::new_id("1/2/3/4/5/6/7/8/9/0").unwrap();
+ let p = crate::storeid::test::module_path::new_id("1/2/3/4/5/6/7/8/9/0").unwrap();
assert!(p.is_in_collection(&["test", "1"]));
assert!(p.is_in_collection(&["test", "1", "2"]));
diff --git a/lib/domain/libimagbookmark/src/collection.rs b/lib/domain/libimagbookmark/src/collection.rs
index 47f2640..9d2dd1e 100644
--- a/lib/domain/libimagbookmark/src/collection.rs
+++ b/lib/domain/libimagbookmark/src/collection.rs
@@ -38,7 +38,7 @@ use libimagentrylink::external::iter::UrlIter;
use libimagentrylink::internal::InternalLinker;
use libimagentrylink::internal::Link as StoreLink;
-use link::Link;
+use crate::link::Link;
use self::iter::LinksMatchingRegexIter;
@@ -51,19 +51,19 @@ pub trait BookmarkCollectionStore<'a> {
impl<'a> BookmarkCollectionStore<'a> for Store {
fn new(&'a self, name: &str) -> Result<FileLockEntry<'a>> {
- ::module_path::new_id(name)
+ crate::module_path::new_id(name)
.and_then(|id| self.create(id).map_err(Error::from))
.map_err(Error::from)
}
fn get(&'a self, name: &str) -> Result<Option<FileLockEntry<'a>>> {
- ::module_path::new_id(name)
+ crate::module_path::new_id(name)
.and_then(|id| self.get(id).map_err(Error::from))
.map_err(Error::from)
}
fn delete(&'a self, name: &str) -> Result<()> {
- ::module_path::new_id(name)
+ crate::module_path::new_id(name)
.and_then(|id| self.delete(id).map_err(Error::from))
.map_err(Error::from)
}
@@ -90,7 +90,7 @@ impl BookmarkCollection for Entry {
}
fn add_link(&mut self, store: &Store, l: Link) -> Result<Vec<StoreId>> {
- use link::IntoUrl;
+ use crate::link::IntoUrl;
l.into_url().and_then(|url| self.add_external_link(store, url))
}
@@ -100,14 +100,14 @@ impl BookmarkCollection for Entry {
}
fn remove_link(&mut self, store: &Store, l: Link) -> Result<Vec<StoreId>> {
- use link::IntoUrl;
+ use crate::link::IntoUrl;
l.into_url().and_then(|url| self.remove_external_link(store, url))
}
}
pub mod iter {
- use link::Link;
+ use crate::link::Link;
use failure::Fallible as Result;
use failure::Error;
@@ -167,7 +167,7 @@ pub mod iter {
}
pub trait IntoLinksMatchingRegexIter<'a> {
- fn matching_regex(self, Regex) -> LinksMatchingRegexIter<'a>;
+ fn matching_regex(self, _: Regex) -> LinksMatchingRegexIter<'a>;
}
impl<'a> IntoLinksMatchingRegexIter<'a> for UrlIter<'a> {
diff --git a/lib/domain/libimagcontact/src/contact.rs b/lib/domain/libimagcontact/src/contact.rs
index e5fb885..89bf630 100644
--- a/lib/domain/libimagcontact/src/contact.rs
+++ b/lib/domain/libimagcontact/src/contact.rs
@@ -28,7 +28,7 @@ use libimagentryutil::isa::Is;
use libimagentryutil::isa::IsKindHeaderPathProvider;
use libimagerror::errors::ErrorMsg as EM;
-use deser::DeserVcard;
+use crate::deser::DeserVcard;
/// Trait to be implemented on ::libimagstore::store::Entry
pub trait Contact {
diff --git a/lib/domain/libimagcontact/src/iter.rs b/lib/domain/libimagcontact/src/iter.rs
index 821ef92..ea836d5 100644
--- a/lib/domain/libimagcontact/src/iter.rs
+++ b/lib/domain/libimagcontact/src/iter.rs
@@ -22,7 +22,7 @@ use libimagstore::store::Store;
use libimagstore::store::FileLockEntry;
use libimagerror::errors::ErrorMsg as EM;
-use contact::Contact;
+use crate::contact::Contact;
use failure::Fallible as Result;
use failure::Error;
diff --git a/lib/domain/libimagcontact/src/store.rs b/lib/domain/libimagcontact/src/store.rs
index eac759a..351365b 100644
--- a/lib/domain/libimagcontact/src/store.rs
+++ b/lib/domain/libimagcontact/src/store.rs
@@ -35,9 +35,9 @@ use libimagstore::store::FileLockEntry;
use libimagentryutil::isa::Is;
use libimagentryref::reference::{MutRef, Config as RefConfig};
-use contact::IsContact;
-use deser::DeserVcard;
-use util;
+use crate::contact::IsContact;
+use crate::deser::DeserVcard;
+use crate::util;
pub trait ContactStore<'a> {
@@ -164,7 +164,7 @@ fn prepare_fetching_from_store(buf: &str) -> Result<(StoreId, Value)> {
toml_from_str::<Value>(&serialized)?
};
- let sid = ::module_path::new_id(uid.raw())?;
+ let sid = crate::module_path::new_id(uid.raw())?;
Ok((sid, value))
}
diff --git a/lib/domain/libimagdiary/src/diary.rs b/lib/domain/libimagdiary/src/diary.rs
index 8d58c5a..0c447df 100644
--- a/lib/domain/libimagdiary/src/diary.rs
+++ b/lib/domain/libimagdiary/src/diary.rs
@@ -32,11 +32,11 @@ use chrono::Timelike;
use failure::Fallible as Result;
use failure::Error;
-use entry::IsDiaryEntry;
-use diaryid::DiaryId;
-use diaryid::FromStoreId;
-use iter::DiaryEntryIterator;
-use iter::DiaryNameIterator;
+use crate::entry::IsDiaryEntry;
+use crate::diaryid::DiaryId;
+use crate::diaryid::FromStoreId;
+use crate::iter::DiaryEntryIterator;
+use crate::iter::DiaryNameIterator;
pub trait Diary {
diff --git a/lib/domain/libimagdiary/src/diaryid.rs b/lib/domain/libimagdiary/src/diaryid.rs
index 832f39f..bdf9444 100644
--- a/lib/domain/libimagdiary/src/diaryid.rs
+++ b/lib/domain/libimagdiary/src/diaryid.rs
@@ -150,7 +150,7 @@ impl IntoStoreId for DiaryId {
fn into_storeid(self) -> Result<StoreId> {
use std::path::PathBuf;
let s : String = self.into();
- ::module_path::new_id(PathBuf::from(s))
+ crate::module_path::new_id(PathBuf::from(s))
}
}
@@ -184,7 +184,7 @@ impl Into<NaiveDateTime> for DiaryId {
}
pub trait FromStoreId : Sized {
- fn from_storeid(&StoreId) -> Result<Self>;
+ fn from_storeid(_: &StoreId) -> Result<Self>;
}
use std::path::Component;
diff --git a/lib/domain/libimagdiary/src/entry.rs b/lib/domain/libimagdiary/src/entry.rs
index 7f3ed76..9235f42 100644
--- a/lib/domain/libimagdiary/src/entry.rs
+++ b/lib/domain/libimagdiary/src/entry.rs
@@ -23,8 +23,8 @@ use libimagentryutil::isa::IsKindHeaderPathProvider;
use failure::Fallible as Result;
-use diaryid::DiaryId;
-use diaryid::FromStoreId;
+use crate::diaryid::DiaryId;
+use crate::diaryid::FromStoreId;
provide_kindflag_path!(pub IsDiaryEntry, "diary.is_diary_entry");
diff --git a/lib/domain/libimagdiary/src/iter.rs b/lib/domain/libimagdiary/src/iter.rs
index 70449f2..147aaf6 100644
--- a/lib/domain/libimagdiary/src/iter.rs
+++ b/lib/domain/libimagdiary/src/iter.rs
@@ -25,7 +25,7 @@ use filters::filter::Filter;
use libimagstore::storeid::StoreIdIterator;
use libimagstore::storeid::StoreId;
-use is_in_diary::IsInDiary;
+use crate::is_in_diary::IsInDiary;
use failure::Fallible as Result;
use failure::Error;
use failure::err_msg;
diff --git a/lib/domain/libimagdiary/src/viewer.rs b/lib/domain/libimagdiary/src/viewer.rs
index 5371787..7b5e699 100644
--- a/lib/domain/libimagdiary/src/viewer.rs
+++ b/lib/domain/libimagdiary/src/viewer.rs
@@ -30,7 +30,7 @@ use failure::Error;
use libimagstore::store::Entry;
use libimagentryview::viewer::Viewer;
use libimagentryview::builtin::plain::PlainViewer;
-use entry::DiaryEntry;
+use crate::entry::DiaryEntry;
/// This viewer does _not_ implement libimagentryview::viewer::Viewer because we need to be able to
/// call some diary-type specific functions on the entries passed to this.
diff --git a/lib/domain/libimaghabit/src/habit.rs b/lib/domain/libimaghabit/src/habit.rs
index 2fcc33f..2e99a44 100644
--- a/lib/domain/libimaghabit/src/habit.rs
+++ b/lib/domain/libimaghabit/src/habit.rs
@@ -27,10 +27,10 @@ use failure::Error;
use failure::Fallible as Result;
use failure::err_msg;
-use iter::HabitInstanceStoreIdIterator;
-use util::IsHabitCheck;
-use util::get_string_header_from_entry;
-use instance::IsHabitInstance;
+use crate::iter::HabitInstanceStoreIdIterator;
+use crate::util::IsHabitCheck;
+use crate::util::get_string_header_from_entry;
+use crate::instance::IsHabitInstance;
use libimagentrylink::internal::InternalLinker;
use libimagstore::store::Store;
@@ -161,7 +161,7 @@ impl HabitTemplate for Entry {
debug!("Increment is {:?}", increment);
let until = self.habit_until_date()?.map(|s| -> Result<_> {
- try!(date_from_s(s))
+ r#try!(date_from_s(s))
.calculate()?
.get_moment()
.map(Clone::clone)
@@ -257,7 +257,7 @@ impl HabitTemplate for Entry {
}
fn instance_id_for_name_and_datestr(habit_name: &String, habit_date: &String) -> Result<StoreId> {
- ::module_path::new_id(format!("instance/{}-{}", habit_name, habit_date)).map_err(Error::from)
+ crate::module_path::new_id(format!("instance/{}-{}", habit_name, habit_date)).map_err(Error::from)
}
pub mod builder {
@@ -276,7 +276,7 @@ pub mod builder {
use failure::err_msg;
use libimagutil::date::date_to_string;
- use habit::IsHabitTemplate;
+ use crate::habit::IsHabitTemplate;
#[derive(Debug)]
pub struct HabitBuilder {
@@ -348,10 +348,10 @@ pub mod builder {
debug!("Success: Date valid");
let comment = self.comment.unwrap_or_else(|| String::new());
- let sid = try!(build_habit_template_sid(&name));
+ let sid = r#try!(build_habit_template_sid(&name));
debug!("Creating entry in store for: {:?}", sid);
- let mut entry = try!(store.create(sid));
+ let mut entry = r#try!(store.create(sid));
let _ = entry.set_isflag::<IsHabitTemplate>()?;
{
@@ -364,7 +364,7 @@ pub mod builder {
if let Some(until) = self.untildate {
let until = date_to_string(&until);
- try!(entry.get_header_mut().insert("habit.template.until", Value::String(until)));
+ r#try!(entry.get_header_mut().insert("habit.template.until", Value::String(until)));
}
debug!("Success: Created entry in store and set headers");
@@ -387,7 +387,7 @@ pub mod builder {
/// Buld a StoreId for a Habit from a date object and a name of a habit
fn build_habit_template_sid(name: &String) -> Result<StoreId> {
- ::module_path::new_id(format!("template/{}", name)).map_err(From::from)
+ crate::module_path::new_id(format!("template/{}", name)).map_err(From::from)
}
}
diff --git a/lib/domain/libimaghabit/src/instance.rs b/lib/domain/libimaghabit/src/instance.rs
index 95e139c..2255afd 100644
--- a/lib/domain/libimaghabit/src/instance.rs
+++ b/lib/domain/libimaghabit/src/instance.rs
@@ -22,7 +22,7 @@ use toml::Value;
use toml_query::set::TomlValueSetExt;
use failure::Fallible as Result;
-use util::*;
+use crate::util::*;
use libimagstore::store::Entry;
use libimagentryutil::isa::Is;
diff --git a/lib/domain/libimaghabit/src/iter.rs b/lib/domain/libimaghabit/src/iter.rs
index 8cdb7c7..f58dbd5 100644
--- a/lib/domain/libimaghabit/src/iter.rs
+++ b/lib/domain/libimaghabit/src/iter.rs
@@ -24,7 +24,7 @@ use libimagstore::storeid::StoreIdIterator;
use libimagstore::storeid::StoreIdIteratorWithStore;
use libimagstore::storeid::StoreId;
-use util::IsHabitCheck;
+use crate::util::IsHabitCheck;
pub struct HabitTemplateStoreIdIterator(StoreIdIterator);
diff --git a/lib/domain/libimaghabit/src/store.rs b/lib/domain/libimaghabit/src/store.rs
index 5fbcf0c..ced874d 100644
--- a/lib/domain/libimaghabit/src/store.rs
+++ b/lib/domain/libimaghabit/src/store.rs
@@ -19,9 +19,9 @@
use failure::Fallible as Result;
-use habit::builder::HabitBuilder;
-use iter::HabitTemplateStoreIdIterator;
-use iter::HabitInstanceStoreIdIterator;
+use crate::habit::builder::HabitBuilder;
+use crate::iter::HabitTemplateStoreIdIterator;
+use crate::iter::HabitInstanceStoreIdIterator;
use libimagstore::store::Store;
diff --git a/lib/domain/libimaghabit/src/util.rs b/lib/domain/libimaghabit/src/util.rs
index 37d4f2b..51adb6c 100644
--- a/lib/domain/libimaghabit/src/util.rs
+++ b/lib/domain/libimaghabit/src/util.rs
@@ -22,8 +22,8 @@ use std::ops::BitXor;
use failure::Error;
use failure::Fallible as Result;
-use habit::HabitTemplate;
-use instance::HabitInstance;
+use crate::habit::HabitTemplate;
+use crate::instance::HabitInstance;
use libimagstore::storeid::StoreId;
use libimagstore::store::Entry;
diff --git a/lib/domain/libimagmail/src/hasher.rs b/lib/domain/libimagmail/src/hasher.rs
index 3d6dd59..fdaf78b 100644
--- a/lib/domain/libimagmail/src/hasher.rs
+++ b/lib/domain/libimagmail/src/hasher.rs
@@ -46,7 +46,7 @@ impl Hasher for MailHasher {
.map(String::from)
.ok_or_else(|| ErrorMsg::UTF8Error)?;
- let message_id = ::util::get_message_id_for_mailfile(path)?;
+ let message_id = crate::util::get_message_id_for_mailfile(path)?;
path_str.push_str(&message_id);
diff --git a/lib/domain/libimagmail/src/mail.rs b/lib/domain/libimagmail/src/mail.rs
index b642944..fca352b 100644
--- a/lib/domain/libimagmail/src/mail.rs
+++ b/lib/domain/libimagmail/src/mail.rs
@@ -48,7 +48,7 @@ impl Mail for Entry {
/// Get a value of a single field of the mail file
fn get_field(&self, refconfig: &RefConfig, field: &str) -> Result<Option<String>> {
use std::fs::read_to_string;
- use hasher::MailHasher;
+ use crate::hasher::MailHasher;
debug!("Getting field in mail: {:?}", field);
let mail_file_location = self.as_ref_with_hasher::<MailHasher>().get_path(refconfig)?;
@@ -107,7 +107,7 @@ impl Mail for Entry {
/// Use `Mail::mail_header()` if you need to read more than one field.
fn get_message_id(&self, refconfig: &RefConfig) -> Result<Option<String>> {
self.get_field(refconfig, "Message-ID")
- .map(|o| o.map(::util::strip_message_delimiters))
+ .map(|o| o.map(crate::util::strip_message_delimiters))
}
/// Get a value of the `In-Reply-To` field of the mail file
diff --git a/lib/domain/libimagmail/src/store.rs b/lib/domain/libimagmail/src/store.rs
index 3355a2c..851c4d4 100644
--- a/lib/domain/libimagmail/src/store.rs
+++ b/lib/domain/libimagmail/src/store.rs
@@ -35,10 +35,10 @@ use libimagentryref::reference::RefFassade;
use libimagentryref::reference::Ref;
use libimagentryref::reference::MutRef;
-use mid::MessageId;
-use mail::Mail;
-use hasher::MailHasher;
-use util::get_message_id_for_mailfile;
+use crate::mid::MessageId;
+use crate::mail::Mail;
+use crate::hasher::MailHasher;
+use crate::util::get_message_id_for_mailfile;
pub trait MailStore<'a> {
fn create_mail_from_path<P, CollName>(&'a self, p: P, collection_name: CollName, config: &Config)
@@ -67,7 +67,7 @@ impl<'a> MailStore<'a> for Store {
CollName: AsRef<str> + Debug
{
let message_id = get_message_id_for_mailfile(p.as_ref())?;
- let new_sid = ::module_path::new_id(message_id.clone())?;
+ let new_sid = crate::module_path::new_id(message_id.clone())?;
let mut entry = self.create(new_sid)?;
let _ = entry
@@ -88,7 +88,7 @@ impl<'a> MailStore<'a> for Store {
where P: AsRef<Path> + Debug
{
let message_id = get_message_id_for_mailfile(p.as_ref())?;
- let new_sid = ::module_path::new_id(message_id.clone())?;
+ let new_sid = crate::module_path::new_id(message_id.clone())?;
match self.get(new_sid)? {
Some(mut entry) => {
@@ -115,7 +115,7 @@ impl<'a> MailStore<'a> for Store {
CollName: AsRef<str> + Debug
{
let message_id = get_message_id_for_mailfile(&p)?;
- let new_sid = ::module_path::new_id(message_id.clone())?;
+ let new_sid = crate::module_path::new_id(message_id.clone())?;
let mut entry = self.retrieve(new_sid)?;
let _ = entry
diff --git a/lib/domain/libimagnotes/src/iter.rs b/lib/domain/libimagnotes/src/iter.rs
index 6753894..74908c8 100644
--- a/lib/domain/libimagnotes/src/iter.rs
+++ b/lib/domain/libimagnotes/src/iter.rs
@@ -20,7 +20,7 @@
use libimagstore::storeid::StoreId;
use libimagstore::storeid::StoreIdIterator;
-use notestoreid::*;
+use crate::notestoreid::*;
use failure::Fallible as Result;
use failure::Error;
diff --git a/lib/domain/libimagnotes/src/notestore.rs b/lib/domain/libimagnotes/src/notestore.rs
index 4245bce..27bd5aa 100644
--- a/lib/domain/libimagnotes/src/notestore.rs
+++ b/lib/domain/libimagnotes/src/notestore.rs
@@ -25,7 +25,7 @@ use libimagstore::store::Store;
use toml_query::insert::TomlValueInsertExt;
use failure::Fallible as Result;
-use iter::*;
+use crate::iter::*;
pub trait NoteStore<'a> {
fn new_note(&'a self, name: String, text: String) -> Result<FileLockEntry<'a>>;
@@ -43,7 +43,7 @@ impl<'a> NoteStore<'a> for Store {
debug!("Creating new Note: '{}'", name);
let fle = {
- let mut lockentry = ::module_path::new_id(name.clone()).and_then(|id| self.create(id))?;
+ let mut lockentry = crate::module_path::new_id(name.clone()).and_then(|id| self.create(id))?;
{
let entry = lockentry.deref_mut();
@@ -58,15 +58,15 @@ impl<'a> NoteStore<'a> for Store {
}
fn delete_note(&'a self, name: String) -> Result<()> {
- ::module_path::new_id(name).and_then(|id| self.delete(id))
+ crate::module_path::new_id(name).and_then(|id| self.delete(id))
}
fn retrieve_note(&'a self, name: String) -> Result<FileLockEntry<'a>> {
- ::module_path::new_id(name).and_then(|id| self.retrieve(id))
+ crate::module_path::new_id(name).and_then(|id| self.retrieve(id))
}
fn get_note(&'a self, name: String) -> Result<Option<FileLockEntry<'a>>> {
- ::module_path::new_id(name).and_then(|id| self.get(id))
+ crate::module_path::new_id(name).and_then(|id| self.get(id))
}
fn all_notes(&'a self) -> Result<NoteIterator> {
diff --git a/lib/domain/libimagtimetrack/src/iter/create.rs b/lib/domain/libimagtimetrack/src/iter/create.rs
index 5d9e4d4..8251903 100644
--- a/lib/domain/libimagtimetrack/src/iter/create.rs
+++ b/lib/domain/libimagtimetrack/src/iter/create.rs
@@ -23,9 +23,9 @@ use chrono::naive::NaiveDateTime as NDT;
use failure::Fallible as Result;
use failure::Error;
-use constants::*;
-use iter::storeid::TagStoreIdIter;
-use iter::setendtime::SetEndTimeIter;
+use crate::constants::*;
+use crate::iter::storeid::TagStoreIdIter;
+use crate::iter::setendtime::SetEndTimeIter;
use libimagstore::store::FileLockEntry;
use libimagstore::store::Store;
diff --git a/lib/domain/libimagtimetrack/src/iter/filter.rs b/lib/domain/libimagtimetrack/src/iter/filter.rs
index f4413c9..b0114c3 100644
--- a/lib/domain/libimagtimetrack/src/iter/filter.rs
+++ b/lib/domain/libimagtimetrack/src/iter/filter.rs
@@ -21,8 +21,8 @@ use chrono::NaiveDateTime;
use libimagstore::store::FileLockEntry;
-use tag::TimeTrackingTag as TTT;
-use timetracking::TimeTracking;
+use crate::tag::TimeTrackingTag as TTT;
+use crate::timetracking::TimeTracking;
pub fn has_start_time(entry: &FileLockEntry) -> bool {
@@ -57,8 +57,8 @@ mod types {
use chrono::NaiveDateTime;
use filters::filter::Filter;
- use tag::TimeTrackingTag as TTT;
- use timetracking::TimeTracking;
+ use crate::tag::TimeTrackingTag as TTT;
+ use crate::timetracking::TimeTracking;
use libimagstore::store::FileLockEntry;
diff --git a/lib/domain/libimagtimetrack/src/iter/get.rs b/lib/domain/libimagtimetrack/src/iter/get.rs
index 186fb94..93adfcd 100644
--- a/lib/domain/libimagtimetrack/src/iter/get.rs
+++ b/lib/domain/libimagtimetrack/src/iter/get.rs
@@ -23,7 +23,7 @@ use libimagstore::store::FileLockEntry;
use failure::Fallible as Result;
-use constants::*;
+use crate::constants::*;
pub struct TimeTrackingsGetIterator<'a>(Entries<'a>, &'a Store);
diff --git a/lib/domain/libimagtimetrack/src/iter/setendtime.rs b/lib/domain/libimagtimetrack/src/iter/setendtime.rs
index aee8ffa..838b8db 100644
--- a/lib/domain/libimagtimetrack/src/iter/setendtime.rs
+++ b/lib/domain/libimagtimetrack/src/iter/setendtime.rs
@@ -22,8 +22,8 @@ use toml_query::insert::TomlValueInsertExt;
use chrono::naive::NaiveDateTime as NDT;
use failure::Fallible as Result;
-use constants::*;
-use iter::create::CreateTimeTrackIter;
+use crate::constants::*;
+use crate::iter::create::CreateTimeTrackIter;
use libimagstore::store::FileLockEntry;
diff --git a/lib/domain/libimagtimetrack/src/iter/storeid.rs b/lib/domain/libimagtimetrack/src/iter/storeid.rs
index 2e2a047..0c747a6 100644
--- a/lib/domain/libimagtimetrack/src/iter/storeid.rs
+++ b/lib/domain/libimagtimetrack/src/iter/storeid.rs
@@ -21,9 +21,9 @@ use chrono::naive::NaiveDateTime as NDT;
use failure::Fallible as Result;
use failure::Error;
-use constants::*;
-use iter::tag::TagIter;
-use iter::create::CreateTimeTrackIter;
+use crate::constants::*;
+use crate::iter::tag::TagIter;
+use crate::iter::create::CreateTimeTrackIter;
use libimagstore::store::Store;
use libimagstore::storeid::StoreId;
@@ -54,7 +54,7 @@ impl Iterator for TagStoreIdIter {
.map(|res| res.and_then(|tag| {
let dt = self.datetime.format(DATE_TIME_FORMAT).to_string();
let id_str = format!("{}-{}", dt, tag.as_str());
- ::module_path::new_id(id_str)
+ crate::module_path::new_id(id_str)
.map_err(Error::from)
.map(|id| (id, self.datetime.clone()))
}))
diff --git a/lib/domain/libimagtimetrack/src/iter/tag.rs b/lib/domain/libimagtimetrack/src/iter/tag.rs
index fcc4a22..696d982 100644
--- a/lib/domain/libimagtimetrack/src/iter/tag.rs
+++ b/lib/domain/libimagtimetrack/src/iter/tag.rs
@@ -22,8 +22,8 @@ use failure::Fallible as Result;
use failure::Error;
use failure::err_msg;
-use tag::TimeTrackingTag as TTT;
-use iter::storeid::TagStoreIdIter;
+use crate::tag::TimeTrackingTag as TTT;
+use crate::iter::storeid::TagStoreIdIter;
use libimagentrytag::tag::is_tag_str;
diff --git a/lib/domain/libimagtimetrack/src/timetracking.rs b/lib/domain/libimagtimetrack/src/timetracking.rs
index 337afc3..045725f 100644
--- a/lib/domain/libimagtimetrack/src/timetracking.rs
+++ b/lib/domain/libimagtimetrack/src/timetracking.rs
@@ -29,8 +29,8 @@ use chrono::naive::NaiveDateTime;
use libimagstore::store::Entry;
use libimagerror::errors::ErrorMsg as EM;
-use tag::TimeTrackingTag as TTT;
-use constants::*;
+use crate::tag::TimeTrackingTag as TTT;
+use crate::constants::*;
use toml::Value;
use toml_query::delete::TomlValueDeleteExt;
diff --git a/lib/domain/libimagtimetrack/src/timetrackingstore.rs b/lib/domain/libimagtimetrack/src/timetrackingstore.rs
index 50339c2..2144185 100644
--- a/lib/domain/libimagtimetrack/src/timetrackingstore.rs
+++ b/lib/domain/libimagtimetrack/src/timetrackingstore.rs
@@ -32,10 +32,10 @@ use libimagstore::store::Store;
use libimagstore::store::FileLockEntry;
use libimagentrydatetime::datepath::compiler::DatePathCompiler;
-use constants::*;
-use iter::get::TimeTrackingsGetIterator;
+use crate::constants::*;
+use crate::iter::get::TimeTrackingsGetIterator;
-use tag::TimeTrackingTag as TTT;
+use crate::tag::TimeTrackingTag as TTT;
pub trait TimeTrackStore<'a> {
diff --git a/lib/domain/libimagtodo/src/taskstore.rs b/lib/domain/libimagtodo/src/taskstore.rs
index bbd2ae7..c0e1cdc 100644
--- a/lib/domain/libimagtodo/src/taskstore.rs
+++ b/lib/domain/libimagtodo/src/taskstore.rs
@@ -34,7 +34,7 @@ use failure::err_msg;
use libimagstore::store::{FileLockEntry, Store};
use libimagerror::errors::ErrorMsg as EM;
-use iter::TaskIdIterator;
+use crate::iter::TaskIdIterator;
/// Task struct containing a `FileLockEntry`
pub trait TaskStore<'a> {
@@ -99,7 +99,7 @@ impl<'a> TaskStore<'a> for Store {
///
/// If there is no task with this UUID, this returns `Ok(None)`.
fn get_task_from_uuid(&'a self, uuid: Uuid) -> Result<Option<FileLockEntry<'a>>> {
- ::module_path::new_id(format!("taskwarrior/{}", uuid)).and_then(|store_id| self.get(store_id))
+ crate::module_path::new_id(format!("taskwarrior/{}", uuid)).and_then(|store_id| self.get(store_id))
}
/// Same as Task::get_from_import() but uses Store::retrieve() rather than Store::get(), to
@@ -150,7 +150,7 @@ impl<'a> TaskStore<'a> for Store {
}
fn delete_task_by_uuid(&self, uuid: Uuid) -> Result<()> {
- ::module_path::new_id(format!("taskwarrior/{}", uuid)).and_then(|id| self.delete(id))
+ crate::module_path::new_id(format!("taskwarrior/{}", uuid)).and_then(|id| self.delete(id))
}
fn all_tasks(&self) -> Result<TaskIdIterator> {
@@ -162,7 +162,7 @@ impl<'a> TaskStore<'a> for Store {
use toml_query::set::TomlValueSetExt;
let uuid = task.uuid();
- ::module_path::new_id(format!("taskwarrior/{}", uuid)).and_then(|id| {
+ crate::module_path::new_id(format!("taskwarrior/{}", uuid)).and_then(|id| {
self.retrieve(id).and_then(|mut fle| {
{
let hdr = fle.get_header_mut();
diff --git a/lib/domain/libimagwiki/src/store.rs b/lib/domain/libimagwiki/src/store.rs
index a1e93e8..165e03a 100644
--- a/lib/domain/libimagwiki/src/store.rs
+++ b/lib/domain/libimagwiki/src/store.rs
@@ -23,7 +23,7 @@ use libimagstore::storeid::StoreId;
use failure::Fallible as Result;
-use wiki::Wiki;
+use crate::wiki::Wiki;
pub trait WikiStore {
@@ -82,6 +82,6 @@ impl WikiStore for Store {
}
fn wiki_path(name: &str) -> Result<StoreId> {
- ::module_path::new_id(name)
+ crate::module_path::new_id(name)
}
diff --git a/lib/domain/libimagwiki/src/wiki.rs b/lib/domain/libimagwiki/src/wiki.rs
index 195f46e..6e88a76 100644
--- a/lib/domain/libimagwiki/src/wiki.rs
+++ b/lib/domain/libimagwiki/src/wiki.rs
@@ -47,14 +47,14 @@ impl<'a, 'b> Wiki<'a, 'b> {
pub(crate) fn create_index_page(&self) -> Result<FileLockEntry<'a>> {
let path = PathBuf::from(format!("{}/index", self.1));
- let sid = ::module_path::new_id(path)?;
+ let sid = crate::module_path::new_id(path)?;
self.0.create(sid)
}
pub(crate) fn get_index_page(&self) -> Result<FileLockEntry<'a>> {
let path = PathBuf::from(format!("{}/index", self.1));
- let sid = ::module_path::new_id(path)?;
+ let sid = crate::module_path::new_id(path)?;
self.0
.get(sid)
@@ -64,13 +64,13 @@ impl<'a, 'b> Wiki<'a, 'b> {
pub fn get_entry<EN: AsRef<str>>(&self, entry_name: EN) -> Result<Option<FileLockEntry<'a>>> {
let path = PathBuf::from(format!("{}/{}", self.1, entry_name.as_ref()));
- let sid = ::module_path::new_id(path)?;
+ let sid = crate::module_path::new_id(path)?;
self.0.get(sid)
}
pub fn create_entry<EN: AsRef<str>>(&self, entry_name: EN) -> Result<FileLockEntry<'a>> {
let path = PathBuf::from(format!("{}/{}", self.1, entry_name.as_ref()));
- let sid = ::module_path::new_id(path)?;
+ let sid = crate::module_path::new_id(path)?;
let mut index = self
.get_entry("index")?
.ok_or_else(|| err_msg("Missing index page"))?;
@@ -81,7 +81,7 @@ impl<'a, 'b> Wiki<'a, 'b> {
pub fn retrieve_entry<EN: AsRef<str>>(&self, entry_name: EN) -> Result<FileLockEntry<'a>> {
let path = PathBuf::from(format!("{}/{}", self.1, entry_name.as_ref()));
- let sid = ::module_path::new_id(path)?;
+ let sid = crate::module_path::new_id(path)?;
let mut index = self
.get_entry("index")?
.ok_or_else(|| err_msg("Missing index page"))?;
@@ -96,7 +96,7 @@ impl<'a, 'b> Wiki<'a, 'b> {
pub fn delete_entry<EN: AsRef<str>>(&self, entry_name: EN) -> Result<()> {
let path = PathBuf::from(format!("{}/{}", self.1, entry_name.as_ref()));
- let sid = ::module_path::new_id(path)?;
+ let sid = crate::module_path::new_id(path)?;
self.0.delete(sid)
}
}
diff --git a/lib/entry/libimagentryannotation/src/annotateable.rs b/lib/entry/libimagentryannotation/src/annotateable.rs
index 19138e7..46b8cdb 100644
--- a/lib/entry/libimagentryannotation/src/annotateable.rs
+++ b/lib/entry/libimagentryannotation/src/annotateable.rs
@@ -51,7 +51,7 @@ impl Annotateable for Entry {
let ann_name = Uuid::new_v4().to_hyphenated().to_string();
debug!("Creating annotation with name = {}", ann_name);
- store.retrieve(::module_path::new_id(ann_name.clone())?)
+ store.retrieve(crate::module_path::new_id(ann_name.clone())?)
.and_then(|mut anno| {
{
let _ = anno.set_isflag::<IsAnnotation>()?;
@@ -73,7 +73,7 @@ impl Annotateable for Entry {
// Fails if there's no such annotation entry or if the link to that annotation entry does not
// exist.
fn denotate<'a>(&mut self, store: &'a Store, ann_name: &str) -> Result<Option<FileLockEntry<'a>>> {
- if let Some(mut annotation) = store.get(::module_path::new_id(ann_name)?)? {
+ if let Some(mut annotation) = store.get(crate::module_path::new_id(ann_name)?)? {
let _ = self.remove_internal_link(&mut annotation)?;
Ok(Some(annotation))
} else {
diff --git a/lib/entry/libimagentrycategory/src/category.rs b/lib/entry/libimagentrycategory/src/category.rs
index c7b3b9f..de81bfb 100644
--- a/lib/entry/libimagentrycategory/src/category.rs
+++ b/lib/entry/libimagentrycategory/src/category.rs
@@ -29,8 +29,8 @@ use toml_query::read::TomlValueReadTypeExt;
use failure::Fallible as Result;
use failure::Error;
use failure::err_msg;
-use store::CATEGORY_REGISTER_NAME_FIELD_PATH;
-use iter::CategoryEntryIterator;
+use crate::store::CATEGORY_REGISTER_NAME_FIELD_PATH;
+use crate::iter::CategoryEntryIterator;
provide_kindflag_path!(pub IsCategory, "category.is_category");
diff --git a/lib/entry/libimagentrycategory/src/entry.rs b/lib/entry/libimagentrycategory/src/entry.rs
index 5301fcf..8260de8 100644
--- a/lib/entry/libimagentrycategory/src/entry.rs
+++ b/lib/entry/libimagentrycategory/src/entry.rs
@@ -30,7 +30,7 @@ use failure::Fallible as Result;
use failure::ResultExt;
use failure::Error;
use failure::err_msg;
-use store::CategoryStore;
+use crate::store::CategoryStore;
pub trait EntryCategory {
diff --git a/lib/entry/libimagentrycategory/src/iter.rs b/lib/entry/libimagentrycategory/src/iter.rs
index 30d13c0..a16f0b9 100644
--- a/lib/entry/libimagentrycategory/src/iter.rs
+++ b/lib/entry/libimagentrycategory/src/iter.rs
@@ -28,8 +28,8 @@ use failure::Fallible as Result;
use failure::ResultExt;
use failure::Error;
use failure::err_msg;
-use store::CATEGORY_REGISTER_NAME_FIELD_PATH;
-use entry::EntryCategory;
+use crate::store::CATEGORY_REGISTER_NAME_FIELD_PATH;
+use crate::entry::EntryCategory;
/// Iterator for Category names
///
diff --git a/lib/entry/libimagentrycategory/src/store.rs b/lib/entry/libimagentrycategory/src/store.rs
index 508b3e8..3ea7864 100644
--- a/lib/entry/libimagentrycategory/src/store.rs
+++ b/lib/entry/libimagentrycategory/src/store.rs
@@ -31,8 +31,8 @@ use failure::Fallible as Result;
use failure::ResultExt;
use failure::Error;
use failure::err_msg;
-use iter::CategoryNameIter;
-use category::IsCategory;
+use crate::iter::CategoryNameIter;
+use crate::category::IsCategory;
pub const CATEGORY_REGISTER_NAME_FIELD_PATH : &'static str = "category.register.name";
@@ -85,7 +85,7 @@ impl CategoryStore for Store {
/// Automatically removes all category settings from entries which are linked to this category.
fn delete_category(&self, name: &str) -> Result<()> {
use libimagentrylink::internal::InternalLinker;
- use category::Category;
+ use crate::category::Category;
trace!("Deleting category: '{}'", name);
let sid = mk_category_storeid(name)?;
@@ -208,7 +208,7 @@ mod tests {
#[inline]
fn mk_category_storeid(s: &str) -> Result<StoreId> {
- ::module_path::new_id(s).context(err_msg("Store id handling error")).map_err(Error::from)
+ crate::module_path::new_id(s).context(err_msg("Store id handling error")).map_err(Error::from)
}
#[inline]
diff --git a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs
index d7515d1..1f06f5e 100644
--- a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs
+++ b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs
@@ -25,8 +25,8 @@ use chrono::Timelike;
use libimagstore::storeid::StoreId;
-use datepath::accuracy::Accuracy;
-use datepath::format::Format;
+use crate::datepath::accuracy::Accuracy;
+use crate::datepath::format::Format;
use failure::Fallible as Result;
pub struct DatePathCompiler {
@@ -127,8 +127,8 @@ impl DatePathCompiler {
#[cfg(test)]
mod test {
use super::*;
- use datepath::accuracy::Accuracy;
- use datepath::format::Format;
+ use crate::datepath::accuracy::Accuracy;
+ use crate::datepath::format::Format;
use chrono::naive::NaiveDate;
use chrono::naive::NaiveDateTime;
diff --git a/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs b/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs
index 225c009..c17da51 100644
--- a/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs
+++ b/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs
@@ -21,7 +21,7 @@ use chrono::naive::NaiveDateTime;
use failure::Fallible as Result;
use libimagstore::storeid::StoreId;
-use datepath::compiler::DatePathCompiler;
+use crate::datepath::compiler::DatePathCompiler;
//
// Extension Trait for NaiveDateTime
diff --git a/lib/entry/libimagentrydatetime/src/datetime.rs b/lib/entry/libimagentrydatetime/src/datetime.rs
index acfa26c..611e5db 100644
--- a/lib/entry/libimagentrydatetime/src/datetime.rs
+++ b/lib/entry/libimagentrydatetime/src/datetime.rs
@@ -30,7 +30,7 @@ use failure::Error;
use failure::Fallible as Result;
use failure::ResultExt;
use failure::err_msg;
-use range::DateTimeRange;
+use crate::range::DateTimeRange;
pub trait EntryDate {
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_eq.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_eq.rs
index caa6dda..3309181 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_eq.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_eq.rs
@@ -19,9 +19,9 @@
use libimagstore::store::Entry;
-use builtin::header::field_path::FieldPath;
-use builtin::header::field_predicate::FieldPredicate;
-use builtin::header::field_predicate::Predicate;
+use crate::builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_predicate::FieldPredicate;
+use crate::builtin::header::field_predicate::Predicate;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_exists.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_exists.rs
index 08994d1..be816c8 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_exists.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_exists.rs
@@ -25,7 +25,7 @@ use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
use failure::Error;
-use builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_path::FieldPath;
pub struct FieldExists {
header_field_path: FieldPath,
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_grep.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_grep.rs
index 96594ef..feb7df4 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_grep.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_grep.rs
@@ -22,9 +22,9 @@ use toml::Value;
use libimagstore::store::Entry;
-use builtin::header::field_path::FieldPath;
-use builtin::header::field_predicate::FieldPredicate;
-use builtin::header::field_predicate::Predicate;
+use crate::builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_predicate::FieldPredicate;
+use crate::builtin::header::field_predicate::Predicate;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_gt.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_gt.rs
index 7709db3..4b43222 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_gt.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_gt.rs
@@ -19,9 +19,9 @@
use libimagstore::store::Entry;
-use builtin::header::field_path::FieldPath;
-use builtin::header::field_predicate::FieldPredicate;
-use builtin::header::field_predicate::Predicate;
+use crate::builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_predicate::FieldPredicate;
+use crate::builtin::header::field_predicate::Predicate;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_isempty.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_isempty.rs
index b420c90..f337831 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_isempty.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_isempty.rs
@@ -20,7 +20,7 @@
use libimagstore::store::Entry;
use toml_query::read::TomlValueReadExt;
-use builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_path::FieldPath;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_istype.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_istype.rs
index 665f764..960ef61 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_istype.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_istype.rs
@@ -19,9 +19,9 @@
use libimagstore::store::Entry;
-use builtin::header::field_path::FieldPath;
-use builtin::header::field_predicate::FieldPredicate;
-use builtin::header::field_predicate::Predicate;
+use crate::builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_predicate::FieldPredicate;
+use crate::builtin::header::field_predicate::Predicate;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_lt.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_lt.rs
index a41c789..682b899 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_lt.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_lt.rs
@@ -19,9 +19,9 @@
use libimagstore::store::Entry;
-use builtin::header::field_path::FieldPath;
-use builtin::header::field_predicate::FieldPredicate;
-use builtin::header::field_predicate::Predicate;
+use crate::builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_predicate::FieldPredicate;
+use crate::builtin::header::field_predicate::Predicate;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/field_predicate.rs b/lib/entry/libimagentryfilter/src/builtin/header/field_predicate.rs
index a2a4ccb..abd08f9 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/field_predicate.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/field_predicate.rs
@@ -22,14 +22,14 @@ use libimagstore::store::Entry;
use toml_query::read::TomlValueReadExt;
use toml::Value;
-use builtin::header::field_path::FieldPath;
+use crate::builtin::header::field_path::FieldPath;
use filters::failable::filter::FailableFilter;
use failure::Fallible as Result;
use failure::Error;
pub trait Predicate {
- fn evaluate(&self, &Value) -> bool;
+ fn evaluate(&self, _: &Value) -> bool;
}
/// Check whether certain header field in a entry is equal to a value
diff --git a/lib/entry/libimagentryfilter/src/builtin/header/version/range.rs b/lib/entry/libimagentryfilter/src/builtin/header/version/range.rs
index b85687a..8a7b55e 100644
--- a/lib/entry/libimagentryfilter/src/builtin/header/version/range.rs
+++ b/lib/entry/libimagentryfilter/src/builtin/header/version/range.rs
@@ -21,8 +21,8 @@ use semver::Version;
use libimagstore::store::Entry;
-use builtin::header::version::gt::VersionGt;
-use builtin::header::version::lt::VersionLt;
+use crate::builtin::header::version::gt::VersionGt;
+use crate::builtin::header::version::lt::VersionLt;
use filters::filter::Filter;
use filters::ops::and::And;
use filters::ops::not::Not;
diff --git a/lib/entry/libimagentrygps/src/entry.rs b/lib/entry/libimagentrygps/src/entry.rs
index 6c6177e..7c64b5c 100644
--- a/lib/entry/libimagentrygps/src/entry.rs
+++ b/lib/entry/libimagentrygps/src/entry.rs
@@ -17,7 +17,7 @@
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
-use types::*;
+use crate::types::*;
use libimagstore::store::Entry;
@@ -107,7 +107,7 @@ mod tests {
use libimagstore::store::Store;
- use entry::*;
+ use crate::entry::*;
fn setup_logging() {
let _ = ::env_logger::try_init;
diff --git a/lib/entry/libimagentrylink/src/external.rs b/lib/entry/libimagentrylink/src/external.rs
index 9362723..3151ebe 100644
--- a/lib/entry/libimagentrylink/src/external.rs
+++ b/lib/entry/libimagentrylink/src/external.rs
@@ -48,7 +48,7 @@ use failure::Fallible as Result;
use failure::ResultExt;
use failure::err_msg;
-use internal::InternalLinker;
+use crate::internal::InternalLinker;
use self::iter::*;
@@ -132,8 +132,8 @@ pub mod iter {
use libimagutil::debug_result::*;
use libimagstore::store::Store;
- use internal::Link;
- use internal::iter::LinkIter;
+ use crate::internal::Link;
+ use crate::internal::iter::LinkIter;
use failure::Fallible as Result;
use url::Url;
@@ -262,7 +262,7 @@ pub mod iter {
type Item = Result<Url>;
fn next(&mut self) -> Option<Self::Item> {
- use external::Link;
+ use crate::external::Link;
loop {
let next = self.0
@@ -335,7 +335,7 @@ impl ExternalLinker for Entry {
debug!("Iterating {} links = {:?}", links.len(), links);
links.into_iter().map(|link| {
let hash = hex::encode(Sha1::digest(&link.as_str().as_bytes()));
- let file_id = ::module_path::new_id(format!("external/{}", hash))
+ let file_id = crate::module_path::new_id(format!("external/{}", hash))
.map_dbg_err(|_| {
format!("Failed to build StoreId for this hash '{:?}'", hash)
})?;
diff --git a/lib/entry/libimagentrylink/src/internal.rs b/lib/entry/libimagentrylink/src/internal.rs
index be979e0..2ed5e5f 100644
--- a/lib/entry/libimagentrylink/src/internal.rs
+++ b/lib/entry/libimagentrylink/src/internal.rs
@@ -504,7 +504,7 @@ pub mod store_check {
fn check_link_consistency(&self) -> Result<()> {
use std::collections::HashMap;
- use internal::InternalLinker;
+ use crate::internal::InternalLinker;
use libimagstore::storeid::StoreId;
use libimagutil::debug_result::DebugResult;
diff --git a/lib/entry/libimagentrymarkdown/src/processor.rs b/lib/entry/libimagentrymarkdown/src/processor.rs
index 6476040..87f03ad 100644
--- a/lib/entry/libimagentrymarkdown/src/processor.rs
+++ b/lib/entry/libimagentrymarkdown/src/processor.rs
@@ -22,7 +22,7 @@ use std::collections::BTreeMap;
use failure::Fallible as Result;
use failure::ResultExt;
use failure::Error;
-use link::extract_links;
+use crate::link::extract_links;
use libimagentrylink::external::ExternalLinker;
use libimagentrylink::internal::InternalLinker;
diff --git a/lib/entry/libimagentryref/src/hasher.rs b/lib/entry/libimagentryref/src/hasher.rs
index adadd60..8a20b25 100644
--- a/lib/entry/libimagentryref/src/hasher.rs
+++ b/lib/entry/libimagentryref/src/hasher.rs
@@ -38,7 +38,7 @@ pub mod sha1 {
use failure::Fallible as Result;
use sha1::{Sha1, Digest};
- use hasher::Hasher;
+ use crate::hasher::Hasher;
pub struct Sha1Hasher;
diff --git a/lib/entry/libimagentryref/src/reference.rs b/lib/entry/libimagentryref/src/reference.rs
index da1ce32..729d23e 100644
--- a/lib/entry/libimagentryref/src/reference.rs
+++ b/lib/entry/libimagentryref/src/reference.rs
@@ -37,7 +37,7 @@ use failure::Error;
use failure::err_msg;
use failure::ResultExt;
-use hasher::Hasher;
+use crate::hasher::Hasher;
/// A configuration of "basepath name" -> "basepath path" mappings
///
@@ -91,8 +91,8 @@ pub mod fassade {
use failure::Fallible as Result;
use failure::Error;
- use hasher::sha1::Sha1Hasher;
- use hasher::Hasher;
+ use crate::hasher::sha1::Sha1Hasher;
+ use crate::hasher::Hasher;
use super::IsRef;
pub trait RefFassade {
@@ -436,7 +436,7 @@ mod test {
use libimagstore::store::Entry;
use super::*;
- use hasher::Hasher;
+ use crate::hasher::Hasher;
fn setup_logging() {
let _ = ::env_logger::try_init();
diff --git a/lib/entry/libimagentryref/src/util.rs b/lib/entry/libimagentryref/src/util.rs
index 1daf2e7..5f3559e 100644
--- a/lib/entry/libimagentryref/src/util.rs
+++ b/lib/entry/libimagentryref/src/util.rs
@@ -21,7 +21,7 @@ use failure::Fallible as Result;
use libimagrt::runtime::Runtime;
-use reference::Config as RefConfig;
+use crate::reference::Config as RefConfig;
pub fn get_ref_config(rt: &Runtime, app_name: &'static str) -> Result<RefConfig> {
use toml_query::read::TomlValueReadExt;
diff --git a/lib/entry/libimagentrytag/src/tagable.rs b/lib/entry/libimagentrytag/src/tagable.rs
index 7186f72..6ff5e4c 100644
--- a/lib/entry/libimagentrytag/src/tagable.rs
+++ b/lib/entry/libimagentrytag/src/tagable.rs
@@ -29,8 +29,8 @@ use failure::Error;
use failure::ResultExt;
use failure::Fallible as Result;
use failure::err_msg;
-use tag::{Tag, TagSlice};
-use tag::is_tag_str;
+use crate::tag::{Tag, TagSlice};
+use crate::tag::is_tag_str;
use toml::Value;
diff --git a/lib/entry/libimagentryview/src/builtin/editor.rs b/lib/entry/libimagentryview/src/builtin/editor.rs
index 81d6d96..8a702e6 100644
--- a/lib/entry/libimagentryview/src/builtin/editor.rs
+++ b/lib/entry/libimagentryview/src/builtin/editor.rs
@@ -23,7 +23,7 @@ use libimagstore::store::Entry;
use libimagrt::runtime::Runtime;
use libimagentryedit::edit::edit_in_tmpfile;
-use viewer::Viewer;
+use crate::viewer::Viewer;
use failure::Fallible as Result;
use failure::ResultExt;
use failure::Error;
diff --git a/lib/entry/libimagentryview/src/builtin/md.rs b/lib/entry/libimagentryview/src/builtin/md.rs
index a309474..1b977e5 100644
--- a/lib/entry/libimagentryview/src/builtin/md.rs
+++ b/lib/entry/libimagentryview/src/builtin/md.rs
@@ -26,7 +26,7 @@ use mdcat::{AnsiTerminal, ResourceAccess, TerminalSize};
use pulldown_cmark::Parser;
use syntect::parsing::SyntaxSet;
-use viewer::Viewer;
+use crate::viewer::Viewer;
use failure::Fallible as Result;
use failure::Error;
diff --git a/lib/entry/libimagentryview/src/builtin/plain.rs b/lib/entry/libimagentryview/src/builtin/plain.rs
index 42c2d14..58b1ff4 100644
--- a/lib/entry/libimagentryview/src/builtin/plain.rs
+++ b/lib/entry/libimagentryview/src/builtin/plain.rs
@@ -21,7 +21,7 @@ use std::io::Write;
use libimagstore::store::Entry;
-use viewer::Viewer;
+use crate::viewer::Viewer;
use failure::Fallible as Result;
pub struct PlainViewer {
diff --git a/lib/entry/libimagentryview/src/builtin/stdout.rs b/lib/entry/libimagentryview/src/builtin/stdout.rs
index a2762d0..a22eba0 100644
--- a/lib/entry/libimagentryview/src/builtin/stdout.rs
+++ b/lib/entry/libimagentryview/src/builtin/stdout.rs
@@ -23,7 +23,7 @@ use libimagstore::store::Entry;
use toml::ser::to_string;
-use viewer::Viewer;
+use crate::viewer::Viewer;
use failure::Fallible as Result;
pub struct StdoutViewer {
diff --git a/lib/etc/libimagtimeui/src/date.rs b/lib/etc/libimagtimeui/src/date.rs
index 9e6f46a..0751d40 100644
--- a/lib/etc/libimagtimeui/src/date.rs
+++ b/lib/etc/libimagtimeui/src/date.rs
@@ -19,7 +19,7 @@
use chrono::naive::NaiveDate as ChronoNaiveDate;
-use parse::Parse;
+use crate::parse::Parse;
pub struct Date {
year: i32,
@@ -61,7 +61,7 @@ impl Parse for Date {
fn parse(s: &str) -> Option<Date> {
use std::str::FromStr;
use regex::Regex;
- use parse::time_parse_regex;
+ use crate::parse::time_parse_regex;
lazy_static! {
static ref R: Regex = Regex::new(time_parse_regex()).unwrap();
@@ -108,7 +108,7 @@ impl Parse for Date {
#[cfg(test)]
mod test {
use super::Date;
- use parse::Parse;
+ use crate::parse::Parse;
#[test]
fn test_valid() {
diff --git a/lib/etc/libimagtimeui/src/datetime.rs b/lib/etc/libimagtimeui/src/datetime.rs
index 5fa7999..3515932 100644
--- a/lib/etc/libimagtimeui/src/datetime.rs
+++ b/lib/etc/libimagtimeui/src/datetime.rs
@@ -19,9 +19,9 @@
use chrono::naive::NaiveDateTime as ChronoNaiveDateTime;
-use parse::Parse;
-use date::Date;
-use time::Time;
+use crate::parse::Parse;
+use crate::date::Date;
+use crate::time::Time;
pub struct DateTime {
date: Date,
diff --git a/lib/etc/libimagtimeui/src/time.rs b/lib/etc/libimagtimeui/src/time.rs
index 89d4f54..a1efb86 100644
--- a/lib/etc/libimagtimeui/src/time.rs
+++ b/lib/etc/libimagtimeui/src/time.rs
@@ -19,7 +19,7 @@
use chrono::naive::NaiveTime as ChronoNaiveTime;
-use parse::Parse;
+use crate::parse::Parse;
pub struct Time {
hour: u32,
@@ -60,7 +60,7 @@ impl Parse for Time {
fn parse(s: &str) -> Option<Time> {
use std::str::FromStr;
use regex::Regex;
- use parse::time_parse_regex;
+ use crate::parse::time_parse_regex;
lazy_static! {
static ref R: Regex = Regex::new(time_parse_regex()).unwrap();
@@ -96,7 +96,7 @@ impl Parse for Time {
#[cfg(test)]
mod test {
use super::Time;
- use parse::Parse;
+ use crate::parse::Parse;
#[test]
fn test_valid() {