Merge pull request #1049 from matthiasbeyer/use-error-chain-result-type
Remove dedicated result modules, use error chain generated Result types
This commit is contained in:
commit
13af22ac16
84 changed files with 52 additions and 546 deletions
|
@ -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;
|
||||
|
|
|
@ -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>(I)
|
||||
|
|
|
@ -48,4 +48,3 @@ module_entry_path_mod!("bookmark");
|
|||
pub mod collection;
|
||||
pub mod error;
|
||||
pub mod link;
|
||||
pub mod result;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
|
||||
use url::Url;
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, BookmarkError>;
|
||||
|
|
@ -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;
|
||||
|
|
|
@ -47,5 +47,4 @@ module_entry_path_mod!("counter");
|
|||
|
||||
pub mod counter;
|
||||
pub mod error;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, CounterError>;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -57,6 +57,5 @@ pub mod diary;
|
|||
pub mod is_in_diary;
|
||||
pub mod entry;
|
||||
pub mod iter;
|
||||
pub mod result;
|
||||
pub mod viewer;
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, DiaryError>;
|
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
//!
|
||||
|
||||
use mail::Mail;
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
|
||||
use libimagentryref::reference::Ref;
|
||||
|
||||
|
|
|
@ -48,5 +48,4 @@ pub mod error;
|
|||
pub mod hasher;
|
||||
pub mod iter;
|
||||
pub mod mail;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, MailError>;
|
||||
|
|
@ -49,5 +49,4 @@ module_entry_path_mod!("notes");
|
|||
|
||||
pub mod error;
|
||||
pub mod note;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, NoteError>;
|
||||
|
|
@ -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");
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, TimeTrackError>;
|
||||
|
||||
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -49,6 +49,5 @@ extern crate task_hookrs;
|
|||
module_entry_path_mod!("todo");
|
||||
|
||||
pub mod error;
|
||||
pub mod result;
|
||||
pub mod task;
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, TodoError>;
|
|
@ -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)]
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -47,5 +47,4 @@ extern crate libimagnotes;
|
|||
pub mod annotateable;
|
||||
pub mod annotation_fetcher;
|
||||
pub mod error;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, AnnotationError>;
|
||||
|
||||
|
|
@ -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)]
|
||||
|
|
|
@ -50,7 +50,6 @@ extern crate libimagstore;
|
|||
pub mod category;
|
||||
pub mod error;
|
||||
pub mod register;
|
||||
pub mod result;
|
||||
|
||||
module_entry_path_mod!("category");
|
||||
|
||||
|
|
|
@ -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";
|
||||
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
|
||||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, CategoryError>;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -21,6 +21,5 @@ pub mod accuracy;
|
|||
pub mod compiler;
|
||||
pub mod error;
|
||||
pub mod format;
|
||||
pub mod result;
|
||||
pub mod to_store_id;
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, DPCE>;
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
use chrono::naive::NaiveDateTime;
|
||||
|
||||
use libimagstore::storeid::StoreId;
|
||||
use datepath::result::Result;
|
||||
use datepath::error::Result;
|
||||
use datepath::compiler::DatePathCompiler;
|
||||
|
||||
//
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -48,5 +48,4 @@ pub mod datepath;
|
|||
pub mod datetime;
|
||||
pub mod error;
|
||||
pub mod range;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, DateError>;
|
||||
|
|
@ -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;
|
||||
|
|
|
@ -43,4 +43,3 @@ extern crate libimagutil;
|
|||
|
||||
pub mod edit;
|
||||
pub mod error;
|
||||
pub mod result;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, EditError>;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -56,5 +56,4 @@ module_entry_path_mod!("links");
|
|||
pub mod error;
|
||||
pub mod external;
|
||||
pub mod internal;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, LinkError>;
|
||||
|
|
@ -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;
|
||||
|
|
|
@ -48,5 +48,4 @@ pub mod cli;
|
|||
pub mod error;
|
||||
pub mod lister;
|
||||
pub mod listers;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
use libimagstore::store::FileLockEntry;
|
||||
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
|
||||
pub trait Lister : Sized {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
use std::io::stdout;
|
||||
|
||||
use lister::Lister;
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
use error::ResultExt;
|
||||
|
||||
use libimagstore::store::FileLockEntry;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, ListError>;
|
||||
|
|
@ -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<HTML> {
|
|||
}
|
||||
|
||||
pub mod iter {
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
use libimagstore::store::Entry;
|
||||
use super::HTML;
|
||||
use super::to_html;
|
||||
|
|
|
@ -44,5 +44,4 @@ extern crate libimagerror;
|
|||
pub mod error;
|
||||
pub mod html;
|
||||
pub mod link;
|
||||
pub mod result;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, MarkdownError>;
|
||||
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -55,4 +55,3 @@ pub mod hasher;
|
|||
pub mod hashers;
|
||||
pub mod lister;
|
||||
pub mod reference;
|
||||
pub mod result;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, RefError>;
|
||||
|
|
@ -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};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, TagError>;
|
||||
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
use libimagstore::store::Entry;
|
||||
|
||||
use viewer::Viewer;
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
|
||||
pub struct PlainViewer {
|
||||
show_header: bool
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -45,6 +45,5 @@ extern crate libimagentryedit;
|
|||
|
||||
pub mod error;
|
||||
pub mod builtin;
|
||||
pub mod result;
|
||||
pub mod viewer;
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, ViewError>;
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
use libimagstore::store::Entry;
|
||||
|
||||
use result::Result;
|
||||
use error::Result;
|
||||
|
||||
pub trait Viewer {
|
||||
|
||||
|
|
|
@ -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::*;
|
||||
|
|
|
@ -49,6 +49,5 @@ extern crate libimagerror;
|
|||
pub mod ask;
|
||||
pub mod error;
|
||||
pub mod filter;
|
||||
pub mod result;
|
||||
pub mod ui;
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
//
|
||||
// imag - the personal information management suite for the commandline
|
||||
// Copyright (C) 2015, 2016 Matthias Beyer <mail@beyermatthias.de> 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<T> = RResult<T, InteractionError>;
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue