mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove unnecessary try!'s
This commit is contained in:
parent
04a3242dc5
commit
c2dd14d3bb
1 changed files with 4 additions and 4 deletions
|
@ -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(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue