diff options
author | Markus Unterwaditzer <markus@unterwaditzer.net> | 2015-02-04 19:18:13 +0100 |
---|---|---|
committer | Markus Unterwaditzer <markus@unterwaditzer.net> | 2015-02-04 19:18:13 +0100 |
commit | 0b85cdd427a04de5fc52b12c5c62e8320db177bd (patch) | |
tree | 6153ca39a213dbd5ea616611d31b624fdecf361c | |
parent | 085f57343754561565b87c2cf592a1d9af1737c9 (diff) |
nightly updates
-rw-r--r-- | src/vobject/lib.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/vobject/lib.rs b/src/vobject/lib.rs index fba6028..1c3ceba 100644 --- a/src/vobject/lib.rs +++ b/src/vobject/lib.rs @@ -90,12 +90,11 @@ impl Component { } impl FromStr for Component { + type Err = String; + /// Same as `vobject::parse_component`, but without the error messages. - fn from_str(s: &str) -> Option<Component> { - match parse_component(s) { - Ok(x) => Some(x), - Err(_) => None - } + fn from_str(s: &str) -> Result<Component, String> { + parse_component(s) } } |