diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-04-09 17:27:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-09 17:27:54 +0200 |
commit | 2ccf9bceaafdc24b1eca88288f5045cb69dd1b08 (patch) | |
tree | 9ae6ded3369ccdee0878b86a5319ecaeb66aaae7 /src/vcard.rs | |
parent | ea9780d1159afda4e4aaf3f7d7ea317b1fd420b7 (diff) | |
parent | d0d8bde43fe1355a740c0f431f7b10f4a2715823 (diff) |
Error cleanup
Diffstat (limited to 'src/vcard.rs')
-rw-r--r-- | src/vcard.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vcard.rs b/src/vcard.rs index 5a4d980..ec750fa 100644 --- a/src/vcard.rs +++ b/src/vcard.rs @@ -22,10 +22,10 @@ impl Vcard { /// Returns an error if the parsed text is not a Vcard (that means that an error is returned /// also if this is a valid icalendar!) /// - pub fn build(s: &str) -> Result<Vcard> { + pub fn build(s: &str) -> VObjectResult<Vcard> { parse_component(s) .and_then(|c| { - Self::from_component(c).map_err(|_| VObjectErrorKind::NotAVCard) + Self::from_component(c).map_err(|_| VObjectError::NotAVCard) }) } @@ -154,7 +154,7 @@ impl VcardBuilder { } } - pub fn build(self) -> Result<Vcard> { + pub fn build(self) -> VObjectResult<Vcard> { let mut v = Vcard::default(); v.set_properties(self.properties); Ok(v) |