diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-10-28 20:51:04 +0100 |
---|---|---|
committer | Markus Unterwaditzer <markus@unterwaditzer.net> | 2018-10-28 20:51:04 +0100 |
commit | 2163caa2e1cf409d3bc8d0b4c010bc1bdedf1998 (patch) | |
tree | 3064c868107a45a5640200b52d63a4efd4aa286c /src/component.rs | |
parent | f100677f3022e68c634c3c19e0b88ed7578aec27 (diff) |
Update dependency: error-chain (#26)
* Update dependency: error-chain
* Replace dependency: error_chain -> failure
* fixup! Replace dependency: error_chain -> failure
* Use enum for errors (in return types)
* fixup! Use enum for errors (in return types)
Diffstat (limited to 'src/component.rs')
-rw-r--r-- | src/component.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/component.rs b/src/component.rs index 897afa5..8330d18 100644 --- a/src/component.rs +++ b/src/component.rs @@ -3,6 +3,7 @@ use std::collections::BTreeMap; use property::Property; use parser::Parser; + use error::*; #[derive(Clone, Debug)] @@ -68,7 +69,7 @@ impl Component { } impl FromStr for Component { - type Err = VObjectError; + type Err = VObjectErrorKind; /// Same as `vobject::parse_component` fn from_str(s: &str) -> Result<Component> { @@ -81,8 +82,7 @@ pub fn parse_component(s: &str) -> Result<Component> { let (rv, new_s) = try!(read_component(s)); if !new_s.is_empty() { let s = format!("Trailing data: `{}`", new_s); - let kind = VObjectErrorKind::ParserError(s); - return Err(VObjectError::from_kind(kind)); + return Err(VObjectErrorKind::ParserError(s)); } Ok(rv) |