summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarkus Unterwaditzer <markus@unterwaditzer.net>2015-02-04 19:18:13 +0100
committerMarkus Unterwaditzer <markus@unterwaditzer.net>2015-02-04 19:18:13 +0100
commit0b85cdd427a04de5fc52b12c5c62e8320db177bd (patch)
tree6153ca39a213dbd5ea616611d31b624fdecf361c /src
parent085f57343754561565b87c2cf592a1d9af1737c9 (diff)
nightly updates
Diffstat (limited to 'src')
-rw-r--r--src/vobject/lib.rs9
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)
}
}