From 18e806f588a2917ba21d289e93216edd3d6c801e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 3 Sep 2017 21:39:32 +0200 Subject: [PATCH] Remove dedicated result modules, use error chain generated Result types --- bin/domain/imag-diary/src/create.rs | 2 +- lib/domain/libimagbookmark/src/collection.rs | 4 +-- lib/domain/libimagbookmark/src/lib.rs | 1 - lib/domain/libimagbookmark/src/link.rs | 2 +- lib/domain/libimagbookmark/src/result.rs | 25 ------------------ lib/domain/libimagcounter/src/counter.rs | 2 +- lib/domain/libimagcounter/src/lib.rs | 1 - lib/domain/libimagcounter/src/result.rs | 25 ------------------ lib/domain/libimagdiary/src/diary.rs | 2 +- lib/domain/libimagdiary/src/entry.rs | 2 +- lib/domain/libimagdiary/src/iter.rs | 2 +- lib/domain/libimagdiary/src/lib.rs | 1 - lib/domain/libimagdiary/src/result.rs | 24 ----------------- lib/domain/libimagdiary/src/viewer.rs | 2 +- lib/domain/libimagmail/src/hasher.rs | 2 +- lib/domain/libimagmail/src/iter.rs | 2 +- lib/domain/libimagmail/src/lib.rs | 1 - lib/domain/libimagmail/src/mail.rs | 2 +- lib/domain/libimagmail/src/result.rs | 25 ------------------ lib/domain/libimagnotes/src/lib.rs | 1 - lib/domain/libimagnotes/src/note.rs | 4 +-- lib/domain/libimagnotes/src/result.rs | 25 ------------------ lib/domain/libimagtimetrack/src/lib.rs | 1 - lib/domain/libimagtimetrack/src/result.rs | 26 ------------------- .../libimagtimetrack/src/timetracking.rs | 2 +- .../libimagtimetrack/src/timetrackingstore.rs | 2 +- lib/domain/libimagtodo/src/lib.rs | 1 - lib/domain/libimagtodo/src/result.rs | 24 ----------------- lib/domain/libimagtodo/src/task.rs | 2 +- .../src/annotateable.rs | 2 +- .../src/annotation_fetcher.rs | 4 +-- lib/entry/libimagentryannotation/src/lib.rs | 1 - .../libimagentryannotation/src/result.rs | 26 ------------------- .../libimagentrycategory/src/category.rs | 2 +- lib/entry/libimagentrycategory/src/lib.rs | 1 - .../libimagentrycategory/src/register.rs | 2 +- lib/entry/libimagentrycategory/src/result.rs | 26 ------------------- .../src/datepath/compiler.rs | 2 +- .../libimagentrydatetime/src/datepath/mod.rs | 1 - .../src/datepath/result.rs | 25 ------------------ .../src/datepath/to_store_id.rs | 2 +- .../libimagentrydatetime/src/datetime.rs | 1 - lib/entry/libimagentrydatetime/src/lib.rs | 1 - lib/entry/libimagentrydatetime/src/result.rs | 25 ------------------ lib/entry/libimagentryedit/src/edit.rs | 2 +- lib/entry/libimagentryedit/src/lib.rs | 1 - lib/entry/libimagentryedit/src/result.rs | 25 ------------------ lib/entry/libimagentrylink/src/external.rs | 4 +-- lib/entry/libimagentrylink/src/internal.rs | 6 ++--- lib/entry/libimagentrylink/src/lib.rs | 1 - lib/entry/libimagentrylink/src/result.rs | 25 ------------------ lib/entry/libimagentrylist/src/cli.rs | 2 +- lib/entry/libimagentrylist/src/lib.rs | 1 - lib/entry/libimagentrylist/src/lister.rs | 2 +- .../libimagentrylist/src/listers/core.rs | 2 +- .../libimagentrylist/src/listers/line.rs | 2 +- .../libimagentrylist/src/listers/path.rs | 2 +- .../libimagentrylist/src/listers/table.rs | 2 +- lib/entry/libimagentrylist/src/result.rs | 25 ------------------ lib/entry/libimagentrymarkdown/src/html.rs | 4 +-- lib/entry/libimagentrymarkdown/src/lib.rs | 1 - lib/entry/libimagentrymarkdown/src/link.rs | 2 +- lib/entry/libimagentrymarkdown/src/result.rs | 25 ------------------ lib/entry/libimagentryref/src/flags.rs | 2 +- lib/entry/libimagentryref/src/hasher.rs | 2 +- .../libimagentryref/src/hashers/nbytes.rs | 2 +- lib/entry/libimagentryref/src/lib.rs | 1 - lib/entry/libimagentryref/src/lister.rs | 2 +- lib/entry/libimagentryref/src/reference.rs | 2 +- lib/entry/libimagentryref/src/result.rs | 25 ------------------ lib/entry/libimagentrytag/src/exec.rs | 2 +- lib/entry/libimagentrytag/src/lib.rs | 1 - lib/entry/libimagentrytag/src/result.rs | 25 ------------------ lib/entry/libimagentrytag/src/tagable.rs | 2 +- .../libimagentryview/src/builtin/editor.rs | 2 +- .../libimagentryview/src/builtin/plain.rs | 2 +- .../libimagentryview/src/builtin/stdout.rs | 2 +- lib/entry/libimagentryview/src/lib.rs | 1 - lib/entry/libimagentryview/src/result.rs | 24 ----------------- lib/entry/libimagentryview/src/viewer.rs | 2 +- lib/etc/libimaginteraction/src/ask.rs | 2 +- lib/etc/libimaginteraction/src/lib.rs | 1 - lib/etc/libimaginteraction/src/result.rs | 24 ----------------- lib/etc/libimaginteraction/src/ui.rs | 2 +- 84 files changed, 52 insertions(+), 546 deletions(-) delete mode 100644 lib/domain/libimagbookmark/src/result.rs delete mode 100644 lib/domain/libimagcounter/src/result.rs delete mode 100644 lib/domain/libimagdiary/src/result.rs delete mode 100644 lib/domain/libimagmail/src/result.rs delete mode 100644 lib/domain/libimagnotes/src/result.rs delete mode 100644 lib/domain/libimagtimetrack/src/result.rs delete mode 100644 lib/domain/libimagtodo/src/result.rs delete mode 100644 lib/entry/libimagentryannotation/src/result.rs delete mode 100644 lib/entry/libimagentrycategory/src/result.rs delete mode 100644 lib/entry/libimagentrydatetime/src/datepath/result.rs delete mode 100644 lib/entry/libimagentrydatetime/src/result.rs delete mode 100644 lib/entry/libimagentryedit/src/result.rs delete mode 100644 lib/entry/libimagentrylink/src/result.rs delete mode 100644 lib/entry/libimagentrylist/src/result.rs delete mode 100644 lib/entry/libimagentrymarkdown/src/result.rs delete mode 100644 lib/entry/libimagentryref/src/result.rs delete mode 100644 lib/entry/libimagentrytag/src/result.rs delete mode 100644 lib/entry/libimagentryview/src/result.rs delete mode 100644 lib/etc/libimaginteraction/src/result.rs diff --git a/bin/domain/imag-diary/src/create.rs b/bin/domain/imag-diary/src/create.rs index e49cae25..3d66599b 100644 --- a/bin/domain/imag-diary/src/create.rs +++ b/bin/domain/imag-diary/src/create.rs @@ -27,7 +27,7 @@ use libimagentryedit::edit::Edit; use libimagrt::runtime::Runtime; use libimagerror::trace::trace_error; use libimagdiary::entry::Entry; -use libimagdiary::result::Result; +use libimagdiary::error::Result; use libimagutil::warn_exit::warn_exit; use util::get_diary_name; diff --git a/lib/domain/libimagbookmark/src/collection.rs b/lib/domain/libimagbookmark/src/collection.rs index 525500ff..858460d0 100644 --- a/lib/domain/libimagbookmark/src/collection.rs +++ b/lib/domain/libimagbookmark/src/collection.rs @@ -31,7 +31,7 @@ use regex::Regex; use error::BookmarkErrorKind as BEK; use error::BookmarkError as BE; use error::ResultExt; -use result::Result; +use error::Result; use module_path::ModuleEntryPath; use libimagstore::store::Store; @@ -150,7 +150,7 @@ impl<'a> BookmarkCollection<'a> { pub mod iter { use link::Link; - use result::Result; + use error::Result; use error::{ResultExt, BookmarkErrorKind as BEK}; pub struct LinkIter(I) diff --git a/lib/domain/libimagbookmark/src/lib.rs b/lib/domain/libimagbookmark/src/lib.rs index 00d94f61..6567cbf1 100644 --- a/lib/domain/libimagbookmark/src/lib.rs +++ b/lib/domain/libimagbookmark/src/lib.rs @@ -48,4 +48,3 @@ module_entry_path_mod!("bookmark"); pub mod collection; pub mod error; pub mod link; -pub mod result; diff --git a/lib/domain/libimagbookmark/src/link.rs b/lib/domain/libimagbookmark/src/link.rs index acc68e60..038fea7f 100644 --- a/lib/domain/libimagbookmark/src/link.rs +++ b/lib/domain/libimagbookmark/src/link.rs @@ -19,7 +19,7 @@ use std::ops::{Deref, DerefMut}; -use result::Result; +use error::Result; use url::Url; diff --git a/lib/domain/libimagbookmark/src/result.rs b/lib/domain/libimagbookmark/src/result.rs deleted file mode 100644 index 780a8035..00000000 --- a/lib/domain/libimagbookmark/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::BookmarkError; - -pub type Result = RResult; - diff --git a/lib/domain/libimagcounter/src/counter.rs b/lib/domain/libimagcounter/src/counter.rs index f58e5bb5..855ee5a1 100644 --- a/lib/domain/libimagcounter/src/counter.rs +++ b/lib/domain/libimagcounter/src/counter.rs @@ -34,7 +34,7 @@ use libimagstore::storeid::StoreId; use libimagstore::storeid::IntoStoreId; use module_path::ModuleEntryPath; -use result::Result; +use error::Result; use error::CounterError as CE; use error::CounterErrorKind as CEK; use error::ResultExt; diff --git a/lib/domain/libimagcounter/src/lib.rs b/lib/domain/libimagcounter/src/lib.rs index 6aa28b71..41db759d 100644 --- a/lib/domain/libimagcounter/src/lib.rs +++ b/lib/domain/libimagcounter/src/lib.rs @@ -47,5 +47,4 @@ module_entry_path_mod!("counter"); pub mod counter; pub mod error; -pub mod result; diff --git a/lib/domain/libimagcounter/src/result.rs b/lib/domain/libimagcounter/src/result.rs deleted file mode 100644 index e24b90c9..00000000 --- a/lib/domain/libimagcounter/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::CounterError; - -pub type Result = RResult; - diff --git a/lib/domain/libimagdiary/src/diary.rs b/lib/domain/libimagdiary/src/diary.rs index 6617f392..8bc94865 100644 --- a/lib/domain/libimagdiary/src/diary.rs +++ b/lib/domain/libimagdiary/src/diary.rs @@ -33,7 +33,7 @@ use diaryid::DiaryId; use error::DiaryError as DE; use error::DiaryErrorKind as DEK; use error::ResultExt; -use result::Result; +use error::Result; use iter::DiaryEntryIterator; use is_in_diary::IsInDiary; diff --git a/lib/domain/libimagdiary/src/entry.rs b/lib/domain/libimagdiary/src/entry.rs index 0148b59d..4e654f5e 100644 --- a/lib/domain/libimagdiary/src/entry.rs +++ b/lib/domain/libimagdiary/src/entry.rs @@ -22,7 +22,7 @@ use std::ops::DerefMut; use libimagstore::store::FileLockEntry; use libimagentryedit::edit::Edit; -use libimagentryedit::result::Result as EditResult; +use libimagentryedit::error::Result as EditResult; use libimagrt::runtime::Runtime; use diaryid::DiaryId; diff --git a/lib/domain/libimagdiary/src/iter.rs b/lib/domain/libimagdiary/src/iter.rs index 285dc34e..63bd0779 100644 --- a/lib/domain/libimagdiary/src/iter.rs +++ b/lib/domain/libimagdiary/src/iter.rs @@ -29,7 +29,7 @@ use is_in_diary::IsInDiary; use entry::Entry as DiaryEntry; use error::DiaryErrorKind as DEK; use error::ResultExt; -use result::Result; +use error::Result; use libimagerror::trace::trace_error; /// A iterator for iterating over diary entries diff --git a/lib/domain/libimagdiary/src/lib.rs b/lib/domain/libimagdiary/src/lib.rs index 90c14679..b9c9697b 100644 --- a/lib/domain/libimagdiary/src/lib.rs +++ b/lib/domain/libimagdiary/src/lib.rs @@ -57,6 +57,5 @@ pub mod diary; pub mod is_in_diary; pub mod entry; pub mod iter; -pub mod result; pub mod viewer; diff --git a/lib/domain/libimagdiary/src/result.rs b/lib/domain/libimagdiary/src/result.rs deleted file mode 100644 index b4f5f382..00000000 --- a/lib/domain/libimagdiary/src/result.rs +++ /dev/null @@ -1,24 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::DiaryError; - -pub type Result = RResult; diff --git a/lib/domain/libimagdiary/src/viewer.rs b/lib/domain/libimagdiary/src/viewer.rs index 9efd293f..e87bc202 100644 --- a/lib/domain/libimagdiary/src/viewer.rs +++ b/lib/domain/libimagdiary/src/viewer.rs @@ -22,7 +22,7 @@ use entry::Entry; use error::DiaryErrorKind as DEK; use error::ResultExt; -use result::Result; +use error::Result; use libimagentryview::viewer::Viewer; use libimagentryview::builtin::plain::PlainViewer; diff --git a/lib/domain/libimagmail/src/hasher.rs b/lib/domain/libimagmail/src/hasher.rs index d650bedd..07817602 100644 --- a/lib/domain/libimagmail/src/hasher.rs +++ b/lib/domain/libimagmail/src/hasher.rs @@ -26,7 +26,7 @@ use libimagentryref::hasher::Hasher; use libimagentryref::hasher::DefaultHasher; use libimagentryref::error::RefErrorKind as REK; use libimagentryref::error::ResultExt; -use libimagentryref::result::Result as RResult; +use libimagentryref::error::Result as RResult; pub struct MailHasher { defaulthasher: DefaultHasher, diff --git a/lib/domain/libimagmail/src/iter.rs b/lib/domain/libimagmail/src/iter.rs index fe1e72a4..92cf2981 100644 --- a/lib/domain/libimagmail/src/iter.rs +++ b/lib/domain/libimagmail/src/iter.rs @@ -25,7 +25,7 @@ //! use mail::Mail; -use result::Result; +use error::Result; use libimagentryref::reference::Ref; diff --git a/lib/domain/libimagmail/src/lib.rs b/lib/domain/libimagmail/src/lib.rs index 09e74a5f..9a6b9413 100644 --- a/lib/domain/libimagmail/src/lib.rs +++ b/lib/domain/libimagmail/src/lib.rs @@ -48,5 +48,4 @@ pub mod error; pub mod hasher; pub mod iter; pub mod mail; -pub mod result; diff --git a/lib/domain/libimagmail/src/mail.rs b/lib/domain/libimagmail/src/mail.rs index 17129c90..426409cc 100644 --- a/lib/domain/libimagmail/src/mail.rs +++ b/lib/domain/libimagmail/src/mail.rs @@ -30,7 +30,7 @@ use email::MimeMessage; use email::results::ParsingResult as EmailParsingResult; use hasher::MailHasher; -use result::Result; +use error::Result; use error::{ResultExt, MailErrorKind as MEK}; struct Buffer(String); diff --git a/lib/domain/libimagmail/src/result.rs b/lib/domain/libimagmail/src/result.rs deleted file mode 100644 index 7f745eda..00000000 --- a/lib/domain/libimagmail/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::MailError; - -pub type Result = RResult; - diff --git a/lib/domain/libimagnotes/src/lib.rs b/lib/domain/libimagnotes/src/lib.rs index 54315538..6d2fbba4 100644 --- a/lib/domain/libimagnotes/src/lib.rs +++ b/lib/domain/libimagnotes/src/lib.rs @@ -49,5 +49,4 @@ module_entry_path_mod!("notes"); pub mod error; pub mod note; -pub mod result; diff --git a/lib/domain/libimagnotes/src/note.rs b/lib/domain/libimagnotes/src/note.rs index a235e64d..599a0db6 100644 --- a/lib/domain/libimagnotes/src/note.rs +++ b/lib/domain/libimagnotes/src/note.rs @@ -24,7 +24,7 @@ use toml::Value; use libimagrt::runtime::Runtime; use libimagentryedit::edit::Edit; -use libimagentryedit::result::Result as EditResult; +use libimagentryedit::error::Result as EditResult; use libimagstore::storeid::IntoStoreId; use libimagstore::storeid::StoreId; use libimagstore::storeid::StoreIdIterator; @@ -35,7 +35,7 @@ use toml_query::read::TomlValueReadExt; use toml_query::set::TomlValueSetExt; use module_path::ModuleEntryPath; -use result::Result; +use error::Result; use error::NoteErrorKind as NEK; use error::NoteError as NE; use error::ResultExt; diff --git a/lib/domain/libimagnotes/src/result.rs b/lib/domain/libimagnotes/src/result.rs deleted file mode 100644 index a11ba895..00000000 --- a/lib/domain/libimagnotes/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::NoteError; - -pub type Result = RResult; - diff --git a/lib/domain/libimagtimetrack/src/lib.rs b/lib/domain/libimagtimetrack/src/lib.rs index 0a14a664..cabe0ef2 100644 --- a/lib/domain/libimagtimetrack/src/lib.rs +++ b/lib/domain/libimagtimetrack/src/lib.rs @@ -56,7 +56,6 @@ pub mod error; pub mod timetracking; pub mod timetrackingstore; pub mod iter; -pub mod result; pub mod tag; module_entry_path_mod!("timetrack"); diff --git a/lib/domain/libimagtimetrack/src/result.rs b/lib/domain/libimagtimetrack/src/result.rs deleted file mode 100644 index 8ea8173f..00000000 --- a/lib/domain/libimagtimetrack/src/result.rs +++ /dev/null @@ -1,26 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::TimeTrackError; - -pub type Result = RResult; - - diff --git a/lib/domain/libimagtimetrack/src/timetracking.rs b/lib/domain/libimagtimetrack/src/timetracking.rs index 3dd36c2a..7c3bf11d 100644 --- a/lib/domain/libimagtimetrack/src/timetracking.rs +++ b/lib/domain/libimagtimetrack/src/timetracking.rs @@ -32,7 +32,7 @@ use tag::TimeTrackingTag as TTT; use error::TimeTrackErrorKind as TTEK; use error::TimeTrackError as TTE; use error::ResultExt; -use result::Result; +use error::Result; use constants::*; use toml::Value; diff --git a/lib/domain/libimagtimetrack/src/timetrackingstore.rs b/lib/domain/libimagtimetrack/src/timetrackingstore.rs index ccd03fd5..669862b5 100644 --- a/lib/domain/libimagtimetrack/src/timetrackingstore.rs +++ b/lib/domain/libimagtimetrack/src/timetrackingstore.rs @@ -30,7 +30,7 @@ use libimagstore::store::Store; use libimagstore::store::FileLockEntry; use libimagentrydatetime::datepath::compiler::DatePathCompiler; -use result::Result; +use error::Result; use constants::*; use error::TimeTrackErrorKind as TTEK; use error::ResultExt; diff --git a/lib/domain/libimagtodo/src/lib.rs b/lib/domain/libimagtodo/src/lib.rs index 78e4bab4..b4313c27 100644 --- a/lib/domain/libimagtodo/src/lib.rs +++ b/lib/domain/libimagtodo/src/lib.rs @@ -49,6 +49,5 @@ extern crate task_hookrs; module_entry_path_mod!("todo"); pub mod error; -pub mod result; pub mod task; diff --git a/lib/domain/libimagtodo/src/result.rs b/lib/domain/libimagtodo/src/result.rs deleted file mode 100644 index 7962851c..00000000 --- a/lib/domain/libimagtodo/src/result.rs +++ /dev/null @@ -1,24 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use error::TodoError; - -use std::result::Result as RResult; - -pub type Result = RResult; diff --git a/lib/domain/libimagtodo/src/task.rs b/lib/domain/libimagtodo/src/task.rs index 3dc5c780..ec7b79e5 100644 --- a/lib/domain/libimagtodo/src/task.rs +++ b/lib/domain/libimagtodo/src/task.rs @@ -34,7 +34,7 @@ use module_path::ModuleEntryPath; use error::{TodoErrorKind as TEK, ResultExt}; use error::TodoError as TE; -use result::Result; +use error::Result; /// Task struct containing a `FileLockEntry` #[derive(Debug)] diff --git a/lib/entry/libimagentryannotation/src/annotateable.rs b/lib/entry/libimagentryannotation/src/annotateable.rs index b356753e..d51380cc 100644 --- a/lib/entry/libimagentryannotation/src/annotateable.rs +++ b/lib/entry/libimagentryannotation/src/annotateable.rs @@ -29,7 +29,7 @@ use libimagentrylink::internal::InternalLinker; use toml_query::read::TomlValueReadExt; use toml_query::insert::TomlValueInsertExt; -use result::Result; +use error::Result; use error::AnnotationErrorKind as AEK; use error::AnnotationError as AE; use error::ResultExt; diff --git a/lib/entry/libimagentryannotation/src/annotation_fetcher.rs b/lib/entry/libimagentryannotation/src/annotation_fetcher.rs index 27f2f4b8..49890550 100644 --- a/lib/entry/libimagentryannotation/src/annotation_fetcher.rs +++ b/lib/entry/libimagentryannotation/src/annotation_fetcher.rs @@ -24,7 +24,7 @@ use libimagnotes::note::Note; use libimagnotes::note::NoteIterator; use libimagstore::storeid::StoreIdIterator; -use result::Result; +use error::Result; use error::AnnotationErrorKind as AEK; use error::ResultExt; @@ -73,7 +73,7 @@ pub mod iter { use libimagnotes::note::Note; use libimagnotes::note::NoteIterator; - use result::Result; + use error::Result; use error::AnnotationErrorKind as AEK; use error::AnnotationError as AE; use error::ResultExt; diff --git a/lib/entry/libimagentryannotation/src/lib.rs b/lib/entry/libimagentryannotation/src/lib.rs index 204e67b3..bd1e9ed5 100644 --- a/lib/entry/libimagentryannotation/src/lib.rs +++ b/lib/entry/libimagentryannotation/src/lib.rs @@ -47,5 +47,4 @@ extern crate libimagnotes; pub mod annotateable; pub mod annotation_fetcher; pub mod error; -pub mod result; diff --git a/lib/entry/libimagentryannotation/src/result.rs b/lib/entry/libimagentryannotation/src/result.rs deleted file mode 100644 index 292fc0e5..00000000 --- a/lib/entry/libimagentryannotation/src/result.rs +++ /dev/null @@ -1,26 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::AnnotationError; - -pub type Result = RResult; - - diff --git a/lib/entry/libimagentrycategory/src/category.rs b/lib/entry/libimagentrycategory/src/category.rs index 002922c1..f2a2b2cf 100644 --- a/lib/entry/libimagentrycategory/src/category.rs +++ b/lib/entry/libimagentrycategory/src/category.rs @@ -27,7 +27,7 @@ use libimagstore::store::Entry; use error::CategoryErrorKind as CEK; use error::CategoryError as CE; use error::ResultExt; -use result::Result; +use error::Result; use register::CategoryRegister; #[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd)] diff --git a/lib/entry/libimagentrycategory/src/lib.rs b/lib/entry/libimagentrycategory/src/lib.rs index 1ea7d05b..06e13f9c 100644 --- a/lib/entry/libimagentrycategory/src/lib.rs +++ b/lib/entry/libimagentrycategory/src/lib.rs @@ -50,7 +50,6 @@ extern crate libimagstore; pub mod category; pub mod error; pub mod register; -pub mod result; module_entry_path_mod!("category"); diff --git a/lib/entry/libimagentrycategory/src/register.rs b/lib/entry/libimagentrycategory/src/register.rs index c4a475e4..ad4d5b73 100644 --- a/lib/entry/libimagentrycategory/src/register.rs +++ b/lib/entry/libimagentrycategory/src/register.rs @@ -32,7 +32,7 @@ use category::Category; use error::CategoryErrorKind as CEK; use error::CategoryError as CE; use error::ResultExt; -use result::Result; +use error::Result; pub const CATEGORY_REGISTER_NAME_FIELD_PATH : &'static str = "category.register.name"; diff --git a/lib/entry/libimagentrycategory/src/result.rs b/lib/entry/libimagentrycategory/src/result.rs deleted file mode 100644 index 517d0e96..00000000 --- a/lib/entry/libimagentrycategory/src/result.rs +++ /dev/null @@ -1,26 +0,0 @@ - -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::CategoryError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs index 12537e8e..7910db7f 100644 --- a/lib/entry/libimagentrydatetime/src/datepath/compiler.rs +++ b/lib/entry/libimagentrydatetime/src/datepath/compiler.rs @@ -27,7 +27,7 @@ use libimagstore::storeid::StoreId; use datepath::accuracy::Accuracy; use datepath::format::Format; -use datepath::result::Result; +use datepath::error::Result; use datepath::error::DatePathCompilerErrorKind as DPCEK; use datepath::error::ResultExt; diff --git a/lib/entry/libimagentrydatetime/src/datepath/mod.rs b/lib/entry/libimagentrydatetime/src/datepath/mod.rs index c964abf9..2fbfc1c4 100644 --- a/lib/entry/libimagentrydatetime/src/datepath/mod.rs +++ b/lib/entry/libimagentrydatetime/src/datepath/mod.rs @@ -21,6 +21,5 @@ pub mod accuracy; pub mod compiler; pub mod error; pub mod format; -pub mod result; pub mod to_store_id; diff --git a/lib/entry/libimagentrydatetime/src/datepath/result.rs b/lib/entry/libimagentrydatetime/src/datepath/result.rs deleted file mode 100644 index 2fc3350a..00000000 --- a/lib/entry/libimagentrydatetime/src/datepath/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -/// Result type for this module. -use super::error::DatePathCompilerError as DPCE; -use std::result::Result as RResult; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs b/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs index c781595b..6f24d517 100644 --- a/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs +++ b/lib/entry/libimagentrydatetime/src/datepath/to_store_id.rs @@ -20,7 +20,7 @@ use chrono::naive::NaiveDateTime; use libimagstore::storeid::StoreId; -use datepath::result::Result; +use datepath::error::Result; use datepath::compiler::DatePathCompiler; // diff --git a/lib/entry/libimagentrydatetime/src/datetime.rs b/lib/entry/libimagentrydatetime/src/datetime.rs index 3a9ddf0c..06d11b07 100644 --- a/lib/entry/libimagentrydatetime/src/datetime.rs +++ b/lib/entry/libimagentrydatetime/src/datetime.rs @@ -28,7 +28,6 @@ use libimagstore::store::Entry; use error::DateErrorKind as DEK; use error::DateError as DE; use error::*; -use result::Result; use range::DateTimeRange; pub trait EntryDate { diff --git a/lib/entry/libimagentrydatetime/src/lib.rs b/lib/entry/libimagentrydatetime/src/lib.rs index 3a231814..fdb8067b 100644 --- a/lib/entry/libimagentrydatetime/src/lib.rs +++ b/lib/entry/libimagentrydatetime/src/lib.rs @@ -48,5 +48,4 @@ pub mod datepath; pub mod datetime; pub mod error; pub mod range; -pub mod result; diff --git a/lib/entry/libimagentrydatetime/src/result.rs b/lib/entry/libimagentrydatetime/src/result.rs deleted file mode 100644 index d6d0a5af..00000000 --- a/lib/entry/libimagentrydatetime/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::DateError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentryedit/src/edit.rs b/lib/entry/libimagentryedit/src/edit.rs index fab34d3d..bd2ee190 100644 --- a/lib/entry/libimagentryedit/src/edit.rs +++ b/lib/entry/libimagentryedit/src/edit.rs @@ -20,7 +20,7 @@ use libimagrt::runtime::Runtime; use libimagstore::store::Entry; -use result::Result; +use error::Result; use error::EditErrorKind; use error::EditError as EE; use error::ResultExt; diff --git a/lib/entry/libimagentryedit/src/lib.rs b/lib/entry/libimagentryedit/src/lib.rs index 6776476f..cc385919 100644 --- a/lib/entry/libimagentryedit/src/lib.rs +++ b/lib/entry/libimagentryedit/src/lib.rs @@ -43,4 +43,3 @@ extern crate libimagutil; pub mod edit; pub mod error; -pub mod result; diff --git a/lib/entry/libimagentryedit/src/result.rs b/lib/entry/libimagentryedit/src/result.rs deleted file mode 100644 index 1d917c05..00000000 --- a/lib/entry/libimagentryedit/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::EditError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrylink/src/external.rs b/lib/entry/libimagentrylink/src/external.rs index 2b3d0923..b13ecbc5 100644 --- a/lib/entry/libimagentrylink/src/external.rs +++ b/lib/entry/libimagentrylink/src/external.rs @@ -46,7 +46,7 @@ use toml_query::set::TomlValueSetExt; use error::LinkErrorKind as LEK; use error::LinkError as LE; -use result::Result; +use error::Result; use internal::InternalLinker; use module_path::ModuleEntryPath; use error::ResultExt; @@ -137,7 +137,7 @@ pub mod iter { use internal::iter::LinkIter; use error::LinkErrorKind as LEK; use error::ResultExt; - use result::Result; + use error::Result; use url::Url; diff --git a/lib/entry/libimagentrylink/src/internal.rs b/lib/entry/libimagentrylink/src/internal.rs index ed550eee..b5b0fd37 100644 --- a/lib/entry/libimagentrylink/src/internal.rs +++ b/lib/entry/libimagentrylink/src/internal.rs @@ -32,7 +32,7 @@ use toml_query::set::TomlValueSetExt; use error::LinkErrorKind as LEK; use error::LinkError as LE; use error::ResultExt; -use result::Result; +use error::Result; use self::iter::LinkIter; use self::iter::IntoValues; @@ -188,7 +188,7 @@ pub mod iter { use error::LinkErrorKind as LEK; use error::ResultExt; - use result::Result; + use error::Result; use toml::Value; use itertools::Itertools; @@ -618,7 +618,7 @@ pub mod store_check { use error::LinkErrorKind as LEK; use error::LinkError as LE; - use result::Result as LResult; + use error::Result as LResult; use internal::InternalLinker; use libimagstore::store::StoreObject; diff --git a/lib/entry/libimagentrylink/src/lib.rs b/lib/entry/libimagentrylink/src/lib.rs index 780cf351..5c24ee34 100644 --- a/lib/entry/libimagentrylink/src/lib.rs +++ b/lib/entry/libimagentrylink/src/lib.rs @@ -56,5 +56,4 @@ module_entry_path_mod!("links"); pub mod error; pub mod external; pub mod internal; -pub mod result; diff --git a/lib/entry/libimagentrylink/src/result.rs b/lib/entry/libimagentrylink/src/result.rs deleted file mode 100644 index 23e50363..00000000 --- a/lib/entry/libimagentrylink/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::LinkError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrylist/src/cli.rs b/lib/entry/libimagentrylist/src/cli.rs index 89dc29e1..e54deba0 100644 --- a/lib/entry/libimagentrylist/src/cli.rs +++ b/lib/entry/libimagentrylist/src/cli.rs @@ -21,7 +21,7 @@ use clap::{Arg, ArgMatches, App, SubCommand}; use libimagstore::store::FileLockEntry; -use result::Result; +use error::Result; use listers::line::LineLister; use listers::path::PathLister; use lister::Lister; diff --git a/lib/entry/libimagentrylist/src/lib.rs b/lib/entry/libimagentrylist/src/lib.rs index 7d779d73..0f4748a4 100644 --- a/lib/entry/libimagentrylist/src/lib.rs +++ b/lib/entry/libimagentrylist/src/lib.rs @@ -48,5 +48,4 @@ pub mod cli; pub mod error; pub mod lister; pub mod listers; -pub mod result; diff --git a/lib/entry/libimagentrylist/src/lister.rs b/lib/entry/libimagentrylist/src/lister.rs index 798061b8..3bb64786 100644 --- a/lib/entry/libimagentrylist/src/lister.rs +++ b/lib/entry/libimagentrylist/src/lister.rs @@ -19,7 +19,7 @@ use libimagstore::store::FileLockEntry; -use result::Result; +use error::Result; pub trait Lister : Sized { diff --git a/lib/entry/libimagentrylist/src/listers/core.rs b/lib/entry/libimagentrylist/src/listers/core.rs index 74a99f47..d653c7bb 100644 --- a/lib/entry/libimagentrylist/src/listers/core.rs +++ b/lib/entry/libimagentrylist/src/listers/core.rs @@ -21,7 +21,7 @@ use std::io::stdout; use std::io::Write; use lister::Lister; -use result::Result; +use error::Result; use error::ResultExt; use libimagstore::store::FileLockEntry; diff --git a/lib/entry/libimagentrylist/src/listers/line.rs b/lib/entry/libimagentrylist/src/listers/line.rs index d61b8da3..69cef86e 100644 --- a/lib/entry/libimagentrylist/src/listers/line.rs +++ b/lib/entry/libimagentrylist/src/listers/line.rs @@ -21,7 +21,7 @@ use std::io::stdout; use std::io::Write; use lister::Lister; -use result::Result; +use error::Result; use error::ResultExt; use libimagstore::store::FileLockEntry; diff --git a/lib/entry/libimagentrylist/src/listers/path.rs b/lib/entry/libimagentrylist/src/listers/path.rs index 55a9afb0..d359226c 100644 --- a/lib/entry/libimagentrylist/src/listers/path.rs +++ b/lib/entry/libimagentrylist/src/listers/path.rs @@ -21,7 +21,7 @@ use std::io::stdout; use std::io::Write; use lister::Lister; -use result::Result; +use error::Result; use error::ResultExt; use libimagstore::store::FileLockEntry; diff --git a/lib/entry/libimagentrylist/src/listers/table.rs b/lib/entry/libimagentrylist/src/listers/table.rs index 08dea4f2..3bb58b95 100644 --- a/lib/entry/libimagentrylist/src/listers/table.rs +++ b/lib/entry/libimagentrylist/src/listers/table.rs @@ -20,7 +20,7 @@ use std::io::stdout; use lister::Lister; -use result::Result; +use error::Result; use error::ResultExt; use libimagstore::store::FileLockEntry; diff --git a/lib/entry/libimagentrylist/src/result.rs b/lib/entry/libimagentrylist/src/result.rs deleted file mode 100644 index e29d7d34..00000000 --- a/lib/entry/libimagentrylist/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::ListError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrymarkdown/src/html.rs b/lib/entry/libimagentrymarkdown/src/html.rs index c1c0bd7c..9322dcfd 100644 --- a/lib/entry/libimagentrymarkdown/src/html.rs +++ b/lib/entry/libimagentrymarkdown/src/html.rs @@ -21,7 +21,7 @@ use hoedown::{Markdown, Html as MdHtml}; use hoedown::renderer::html::Flags as HtmlFlags; use hoedown::renderer::Render; -use result::Result; +use error::Result; use error::MarkdownErrorKind; use error::ResultExt; @@ -37,7 +37,7 @@ pub fn to_html(buffer: &str) -> Result { } pub mod iter { - use result::Result; + use error::Result; use libimagstore::store::Entry; use super::HTML; use super::to_html; diff --git a/lib/entry/libimagentrymarkdown/src/lib.rs b/lib/entry/libimagentrymarkdown/src/lib.rs index fd00ee80..e17751dc 100644 --- a/lib/entry/libimagentrymarkdown/src/lib.rs +++ b/lib/entry/libimagentrymarkdown/src/lib.rs @@ -44,5 +44,4 @@ extern crate libimagerror; pub mod error; pub mod html; pub mod link; -pub mod result; diff --git a/lib/entry/libimagentrymarkdown/src/link.rs b/lib/entry/libimagentrymarkdown/src/link.rs index 7d90cb5d..7de3edc7 100644 --- a/lib/entry/libimagentrymarkdown/src/link.rs +++ b/lib/entry/libimagentrymarkdown/src/link.rs @@ -19,7 +19,7 @@ use error::MarkdownErrorKind as MEK; use error::ResultExt; -use result::Result; +use error::Result; use hoedown::renderer::Render; use hoedown::Buffer; diff --git a/lib/entry/libimagentrymarkdown/src/result.rs b/lib/entry/libimagentrymarkdown/src/result.rs deleted file mode 100644 index f00a3122..00000000 --- a/lib/entry/libimagentrymarkdown/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::MarkdownError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentryref/src/flags.rs b/lib/entry/libimagentryref/src/flags.rs index 95873506..53b41540 100644 --- a/lib/entry/libimagentryref/src/flags.rs +++ b/lib/entry/libimagentryref/src/flags.rs @@ -23,7 +23,7 @@ use toml::Value; use error::RefErrorKind as REK; use error::ResultExt; -use result::Result; +use error::Result; pub struct RefFlags { content_hashing: bool, diff --git a/lib/entry/libimagentryref/src/hasher.rs b/lib/entry/libimagentryref/src/hasher.rs index 7d2922f2..ad10f71e 100644 --- a/lib/entry/libimagentryref/src/hasher.rs +++ b/lib/entry/libimagentryref/src/hasher.rs @@ -26,7 +26,7 @@ use error::ResultExt; use crypto::sha1::Sha1; use crypto::digest::Digest; -use result::Result; +use error::Result; /// The Hasher trait is used to implement custom hashing functions for the ref library. /// This means that one can define how the hash of a reference is constructed from the content of diff --git a/lib/entry/libimagentryref/src/hashers/nbytes.rs b/lib/entry/libimagentryref/src/hashers/nbytes.rs index e52ba813..be7b444b 100644 --- a/lib/entry/libimagentryref/src/hashers/nbytes.rs +++ b/lib/entry/libimagentryref/src/hashers/nbytes.rs @@ -25,7 +25,7 @@ use crypto::sha1::Sha1; use crypto::digest::Digest; use hasher::Hasher; -use result::Result; +use error::Result; use error::RefErrorKind as REK; use error::ResultExt; diff --git a/lib/entry/libimagentryref/src/lib.rs b/lib/entry/libimagentryref/src/lib.rs index beea98db..c72ee298 100644 --- a/lib/entry/libimagentryref/src/lib.rs +++ b/lib/entry/libimagentryref/src/lib.rs @@ -55,4 +55,3 @@ pub mod hasher; pub mod hashers; pub mod lister; pub mod reference; -pub mod result; diff --git a/lib/entry/libimagentryref/src/lister.rs b/lib/entry/libimagentryref/src/lister.rs index f87bea31..e560ac34 100644 --- a/lib/entry/libimagentryref/src/lister.rs +++ b/lib/entry/libimagentryref/src/lister.rs @@ -22,7 +22,7 @@ use std::io::stdout; use std::io::Write; use libimagentrylist::lister::Lister; -use libimagentrylist::result::Result; +use libimagentrylist::error::Result; use libimagentrylist::error::ResultExt; use libimagerror::trace::trace_error; use libimagstore::store::FileLockEntry; diff --git a/lib/entry/libimagentryref/src/reference.rs b/lib/entry/libimagentryref/src/reference.rs index a62d0f5c..c9a7479a 100644 --- a/lib/entry/libimagentryref/src/reference.rs +++ b/lib/entry/libimagentryref/src/reference.rs @@ -43,7 +43,7 @@ use error::RefErrorKind as REK; use error::RefError as RE; use error::ResultExt; use flags::RefFlags; -use result::Result; +use error::Result; use hasher::*; use module_path::ModuleEntryPath; diff --git a/lib/entry/libimagentryref/src/result.rs b/lib/entry/libimagentryref/src/result.rs deleted file mode 100644 index eefcec65..00000000 --- a/lib/entry/libimagentryref/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::RefError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrytag/src/exec.rs b/lib/entry/libimagentrytag/src/exec.rs index 216e2c28..57ad3512 100644 --- a/lib/entry/libimagentrytag/src/exec.rs +++ b/lib/entry/libimagentrytag/src/exec.rs @@ -21,7 +21,7 @@ use clap::ArgMatches; use libimagstore::store::FileLockEntry; -use result::Result; +use error::Result; use tagable::*; use ui::{get_add_tags, get_remove_tags}; diff --git a/lib/entry/libimagentrytag/src/lib.rs b/lib/entry/libimagentrytag/src/lib.rs index 821f75b3..cf2be7d9 100644 --- a/lib/entry/libimagentrytag/src/lib.rs +++ b/lib/entry/libimagentrytag/src/lib.rs @@ -50,7 +50,6 @@ extern crate libimagerror; pub mod error; pub mod exec; -pub mod result; pub mod tag; pub mod tagable; pub mod ui; diff --git a/lib/entry/libimagentrytag/src/result.rs b/lib/entry/libimagentrytag/src/result.rs deleted file mode 100644 index 02d72766..00000000 --- a/lib/entry/libimagentrytag/src/result.rs +++ /dev/null @@ -1,25 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::TagError; - -pub type Result = RResult; - diff --git a/lib/entry/libimagentrytag/src/tagable.rs b/lib/entry/libimagentrytag/src/tagable.rs index 5a2aeeae..65c3275d 100644 --- a/lib/entry/libimagentrytag/src/tagable.rs +++ b/lib/entry/libimagentrytag/src/tagable.rs @@ -27,7 +27,7 @@ use toml_query::set::TomlValueSetExt; use error::TagErrorKind; use error::TagError as TE; use error::ResultExt; -use result::Result; +use error::Result; use tag::{Tag, TagSlice}; use tag::is_tag_str; diff --git a/lib/entry/libimagentryview/src/builtin/editor.rs b/lib/entry/libimagentryview/src/builtin/editor.rs index be268acc..abfe0ed2 100644 --- a/lib/entry/libimagentryview/src/builtin/editor.rs +++ b/lib/entry/libimagentryview/src/builtin/editor.rs @@ -22,7 +22,7 @@ use libimagrt::runtime::Runtime; use libimagentryedit::edit::edit_in_tmpfile; use viewer::Viewer; -use result::Result; +use error::Result; use error::ResultExt; use error::ViewErrorKind as VEK; diff --git a/lib/entry/libimagentryview/src/builtin/plain.rs b/lib/entry/libimagentryview/src/builtin/plain.rs index f40b2527..c5c3a2a1 100644 --- a/lib/entry/libimagentryview/src/builtin/plain.rs +++ b/lib/entry/libimagentryview/src/builtin/plain.rs @@ -20,7 +20,7 @@ use libimagstore::store::Entry; use viewer::Viewer; -use result::Result; +use error::Result; pub struct PlainViewer { show_header: bool diff --git a/lib/entry/libimagentryview/src/builtin/stdout.rs b/lib/entry/libimagentryview/src/builtin/stdout.rs index 3d9fea05..20872ae6 100644 --- a/lib/entry/libimagentryview/src/builtin/stdout.rs +++ b/lib/entry/libimagentryview/src/builtin/stdout.rs @@ -22,7 +22,7 @@ use libimagstore::store::Entry; use toml::ser::to_string; use viewer::Viewer; -use result::Result; +use error::Result; pub struct StdoutViewer { view_header: bool, diff --git a/lib/entry/libimagentryview/src/lib.rs b/lib/entry/libimagentryview/src/lib.rs index c7870970..4ce6d2d0 100644 --- a/lib/entry/libimagentryview/src/lib.rs +++ b/lib/entry/libimagentryview/src/lib.rs @@ -45,6 +45,5 @@ extern crate libimagentryedit; pub mod error; pub mod builtin; -pub mod result; pub mod viewer; diff --git a/lib/entry/libimagentryview/src/result.rs b/lib/entry/libimagentryview/src/result.rs deleted file mode 100644 index 3650b1fe..00000000 --- a/lib/entry/libimagentryview/src/result.rs +++ /dev/null @@ -1,24 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::ViewError; - -pub type Result = RResult; diff --git a/lib/entry/libimagentryview/src/viewer.rs b/lib/entry/libimagentryview/src/viewer.rs index 35763126..aad541c1 100644 --- a/lib/entry/libimagentryview/src/viewer.rs +++ b/lib/entry/libimagentryview/src/viewer.rs @@ -19,7 +19,7 @@ use libimagstore::store::Entry; -use result::Result; +use error::Result; pub trait Viewer { diff --git a/lib/etc/libimaginteraction/src/ask.rs b/lib/etc/libimaginteraction/src/ask.rs index 475a2f0d..96dbc560 100644 --- a/lib/etc/libimaginteraction/src/ask.rs +++ b/lib/etc/libimaginteraction/src/ask.rs @@ -26,7 +26,7 @@ use std::result::Result as RResult; use error::InteractionErrorKind; use error::ResultExt; -use result::Result; +use error::Result; use regex::Regex; use ansi_term::Colour::*; diff --git a/lib/etc/libimaginteraction/src/lib.rs b/lib/etc/libimaginteraction/src/lib.rs index 36f9a04d..0a2aa118 100644 --- a/lib/etc/libimaginteraction/src/lib.rs +++ b/lib/etc/libimaginteraction/src/lib.rs @@ -49,6 +49,5 @@ extern crate libimagerror; pub mod ask; pub mod error; pub mod filter; -pub mod result; pub mod ui; diff --git a/lib/etc/libimaginteraction/src/result.rs b/lib/etc/libimaginteraction/src/result.rs deleted file mode 100644 index 8eeaf47b..00000000 --- a/lib/etc/libimaginteraction/src/result.rs +++ /dev/null @@ -1,24 +0,0 @@ -// -// imag - the personal information management suite for the commandline -// Copyright (C) 2015, 2016 Matthias Beyer and contributors -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; version -// 2.1 of the License. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -// - -use std::result::Result as RResult; - -use error::InteractionError; - -pub type Result = RResult; diff --git a/lib/etc/libimaginteraction/src/ui.rs b/lib/etc/libimaginteraction/src/ui.rs index f75c304a..d1712f94 100644 --- a/lib/etc/libimaginteraction/src/ui.rs +++ b/lib/etc/libimaginteraction/src/ui.rs @@ -23,8 +23,8 @@ use clap::{Arg, ArgMatches}; use libimagstore::storeid::StoreId; -use result::Result; use error::InteractionError as IE; +use error::Result; use error::InteractionErrorKind as IEK; use error::ResultExt;