From 18e806f588a2917ba21d289e93216edd3d6c801e Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 3 Sep 2017 21:39:32 +0200 Subject: Remove dedicated result modules, use error chain generated Result types --- .../libimagentryannotation/src/annotateable.rs | 2 +- .../src/annotation_fetcher.rs | 4 ++-- lib/entry/libimagentryannotation/src/lib.rs | 1 - lib/entry/libimagentryannotation/src/result.rs | 26 ---------------------- lib/entry/libimagentrycategory/src/category.rs | 2 +- lib/entry/libimagentrycategory/src/lib.rs | 1 - lib/entry/libimagentrycategory/src/register.rs | 2 +- lib/entry/libimagentrycategory/src/result.rs | 26 ---------------------- .../libimagentrydatetime/src/datepath/compiler.rs | 2 +- lib/entry/libimagentrydatetime/src/datepath/mod.rs | 1 - .../libimagentrydatetime/src/datepath/result.rs | 25 --------------------- .../src/datepath/to_store_id.rs | 2 +- lib/entry/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 +- lib/entry/libimagentrylist/src/listers/core.rs | 2 +- lib/entry/libimagentrylist/src/listers/line.rs | 2 +- lib/entry/libimagentrylist/src/listers/path.rs | 2 +- lib/entry/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 +- lib/entry/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 +- lib/entry/libimagentryview/src/builtin/editor.rs | 2 +- lib/entry/libimagentryview/src/builtin/plain.rs | 2 +- lib/entry/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 +- 51 files changed, 33 insertions(+), 321 deletions(-) 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 (limited to 'lib/entry') 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 { -- cgit v1.2.3