servo: Merge #14964 - Remove unnecessary try!'s (from canaltinova:ok-try); r=Wafflespeanut

<!-- Please describe your changes on the following line: -->
These try!'s are unnecessary here. We can remove them.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors

<!-- Either: -->
- [X] These changes do not require tests because it's just refactoring

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

Source-Repo: https://github.com/servo/servo
Source-Revision: 6447a9783892d6ed585cf75b056ef81f0aba504c
This commit is contained in:
Nazım Can Altınova 2017-01-11 15:47:04 -08:00
parent 873f716138
commit 0ef272bad5

View File

@ -239,7 +239,7 @@ impl Parse for InsetRect {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
match_ignore_ascii_case! { try!(input.expect_function()), match_ignore_ascii_case! { try!(input.expect_function()),
"inset" => { "inset" => {
Ok(try!(input.parse_nested_block(|i| InsetRect::parse_function_arguments(context, i)))) input.parse_nested_block(|i| InsetRect::parse_function_arguments(context, i))
}, },
_ => Err(()) _ => Err(())
} }
@ -414,7 +414,7 @@ impl Parse for Circle {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
match_ignore_ascii_case! { try!(input.expect_function()), match_ignore_ascii_case! { try!(input.expect_function()),
"circle" => { "circle" => {
Ok(try!(input.parse_nested_block(|i| Circle::parse_function_arguments(context, i)))) input.parse_nested_block(|i| Circle::parse_function_arguments(context, i))
}, },
_ => Err(()) _ => Err(())
} }
@ -498,7 +498,7 @@ impl Parse for Ellipse {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
match_ignore_ascii_case! { try!(input.expect_function()), match_ignore_ascii_case! { try!(input.expect_function()),
"ellipse" => { "ellipse" => {
Ok(try!(input.parse_nested_block(|i| Ellipse::parse_function_arguments(context, i)))) input.parse_nested_block(|i| Ellipse::parse_function_arguments(context, i))
}, },
_ => Err(()) _ => Err(())
} }
@ -576,7 +576,7 @@ impl Parse for Polygon {
fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> { fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
match_ignore_ascii_case! { try!(input.expect_function()), match_ignore_ascii_case! { try!(input.expect_function()),
"polygon" => { "polygon" => {
Ok(try!(input.parse_nested_block(|i| Polygon::parse_function_arguments(context, i)))) input.parse_nested_block(|i| Polygon::parse_function_arguments(context, i))
}, },
_ => Err(()) _ => Err(())
} }