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:
Matthias Beyer 2017-09-04 10:54:56 +02:00 committed by GitHub
commit 13af22ac16
84 changed files with 52 additions and 546 deletions

View file

@ -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;

View file

@ -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)

View file

@ -48,4 +48,3 @@ module_entry_path_mod!("bookmark");
pub mod collection;
pub mod error;
pub mod link;
pub mod result;

View file

@ -19,7 +19,7 @@
use std::ops::{Deref, DerefMut};
use result::Result;
use error::Result;
use url::Url;

View file

@ -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>;

View file

@ -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;

View file

@ -47,5 +47,4 @@ module_entry_path_mod!("counter");
pub mod counter;
pub mod error;
pub mod result;

View file

@ -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>;

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -57,6 +57,5 @@ pub mod diary;
pub mod is_in_diary;
pub mod entry;
pub mod iter;
pub mod result;
pub mod viewer;

View file

@ -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>;

View file

@ -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;

View file

@ -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,

View file

@ -25,7 +25,7 @@
//!
use mail::Mail;
use result::Result;
use error::Result;
use libimagentryref::reference::Ref;

View file

@ -48,5 +48,4 @@ pub mod error;
pub mod hasher;
pub mod iter;
pub mod mail;
pub mod result;

View file

@ -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);

View file

@ -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>;

View file

@ -49,5 +49,4 @@ module_entry_path_mod!("notes");
pub mod error;
pub mod note;
pub mod result;

View file

@ -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;

View file

@ -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>;

View file

@ -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");

View file

@ -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>;

View file

@ -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;

View file

@ -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;

View file

@ -49,6 +49,5 @@ extern crate task_hookrs;
module_entry_path_mod!("todo");
pub mod error;
pub mod result;
pub mod task;

View file

@ -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>;

View file

@ -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)]

View file

@ -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;

View file

@ -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;

View file

@ -47,5 +47,4 @@ extern crate libimagnotes;
pub mod annotateable;
pub mod annotation_fetcher;
pub mod error;
pub mod result;

View file

@ -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>;

View file

@ -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)]

View file

@ -50,7 +50,6 @@ extern crate libimagstore;
pub mod category;
pub mod error;
pub mod register;
pub mod result;
module_entry_path_mod!("category");

View file

@ -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";

View file

@ -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>;

View file

@ -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;

View file

@ -21,6 +21,5 @@ pub mod accuracy;
pub mod compiler;
pub mod error;
pub mod format;
pub mod result;
pub mod to_store_id;

View file

@ -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>;

View file

@ -20,7 +20,7 @@
use chrono::naive::NaiveDateTime;
use libimagstore::storeid::StoreId;
use datepath::result::Result;
use datepath::error::Result;
use datepath::compiler::DatePathCompiler;
//

View file

@ -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 {

View file

@ -48,5 +48,4 @@ pub mod datepath;
pub mod datetime;
pub mod error;
pub mod range;
pub mod result;

View file

@ -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>;

View file

@ -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;

View file

@ -43,4 +43,3 @@ extern crate libimagutil;
pub mod edit;
pub mod error;
pub mod result;

View file

@ -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>;

View file

@ -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;

View file

@ -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;

View file

@ -56,5 +56,4 @@ module_entry_path_mod!("links");
pub mod error;
pub mod external;
pub mod internal;
pub mod result;

View file

@ -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>;

View file

@ -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;

View file

@ -48,5 +48,4 @@ pub mod cli;
pub mod error;
pub mod lister;
pub mod listers;
pub mod result;

View file

@ -19,7 +19,7 @@
use libimagstore::store::FileLockEntry;
use result::Result;
use error::Result;
pub trait Lister : Sized {

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -20,7 +20,7 @@
use std::io::stdout;
use lister::Lister;
use result::Result;
use error::Result;
use error::ResultExt;
use libimagstore::store::FileLockEntry;

View file

@ -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>;

View file

@ -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;

View file

@ -44,5 +44,4 @@ extern crate libimagerror;
pub mod error;
pub mod html;
pub mod link;
pub mod result;

View file

@ -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;

View file

@ -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>;

View file

@ -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,

View file

@ -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

View file

@ -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;

View file

@ -55,4 +55,3 @@ pub mod hasher;
pub mod hashers;
pub mod lister;
pub mod reference;
pub mod result;

View file

@ -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;

View file

@ -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;

View file

@ -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>;

View file

@ -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};

View file

@ -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;

View file

@ -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>;

View file

@ -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;

View file

@ -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;

View file

@ -20,7 +20,7 @@
use libimagstore::store::Entry;
use viewer::Viewer;
use result::Result;
use error::Result;
pub struct PlainViewer {
show_header: bool

View file

@ -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,

View file

@ -45,6 +45,5 @@ extern crate libimagentryedit;
pub mod error;
pub mod builtin;
pub mod result;
pub mod viewer;

View file

@ -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>;

View file

@ -19,7 +19,7 @@
use libimagstore::store::Entry;
use result::Result;
use error::Result;
pub trait Viewer {

View file

@ -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::*;

View file

@ -49,6 +49,5 @@ extern crate libimagerror;
pub mod ask;
pub mod error;
pub mod filter;
pub mod result;
pub mod ui;

View file

@ -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>;

View file

@ -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;