diff options
Diffstat (limited to 'src/component.rs')
-rw-r--r-- | src/component.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/component.rs b/src/component.rs index 8330d18..f87e992 100644 --- a/src/component.rs +++ b/src/component.rs @@ -79,7 +79,7 @@ impl FromStr for Component { /// Parse exactly one component. Trailing data generates errors. pub fn parse_component(s: &str) -> Result<Component> { - let (rv, new_s) = try!(read_component(s)); + let (rv, new_s) = read_component(s)?; if !new_s.is_empty() { let s = format!("Trailing data: `{}`", new_s); return Err(VObjectErrorKind::ParserError(s)); @@ -91,7 +91,7 @@ pub fn parse_component(s: &str) -> Result<Component> { /// Parse one component and return the rest of the string. pub fn read_component(s: &str) -> Result<(Component, &str)> { let mut parser = Parser::new(s); - let rv = try!(parser.consume_component()); + let rv = parser.consume_component()?; let new_s = if parser.eof() { "" } else { |