libimagentrymarkdown: Rewrite error handling
This commit is contained in:
parent
9aa5d7439d
commit
bb6956740d
2 changed files with 6 additions and 5 deletions
|
@ -17,6 +17,10 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
//
|
||||
|
||||
use std::error::Error;
|
||||
|
||||
use libimagerror::into::IntoError;
|
||||
|
||||
error_chain! {
|
||||
types {
|
||||
MarkdownError, MarkdownErrorKind, ResultExt, Result;
|
||||
|
@ -36,9 +40,6 @@ error_chain! {
|
|||
}
|
||||
}
|
||||
|
||||
pub use self::error::MarkdownError;
|
||||
pub use self::error::MarkdownErrorKind;
|
||||
|
||||
|
||||
impl IntoError for MarkdownErrorKind {
|
||||
type Target = MarkdownError;
|
||||
|
@ -47,7 +48,7 @@ impl IntoError for MarkdownErrorKind {
|
|||
MarkdownError::from_kind(self)
|
||||
}
|
||||
|
||||
fn into_error_with_cause(self, cause: Box<Error>) -> Self::Target {
|
||||
fn into_error_with_cause(self, _: Box<Error>) -> Self::Target {
|
||||
MarkdownError::from_kind(self)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
extern crate hoedown;
|
||||
extern crate url;
|
||||
extern crate libimagstore;
|
||||
#[macro_use] extern crate libimagerror;
|
||||
extern crate libimagerror;
|
||||
#[macro_use] extern crate error_chain;
|
||||
|
||||
pub mod error;
|
||||
|
|
Loading…
Reference in a new issue