servo: Merge #14964 - Remove unnecessary try!'s (from canaltinova:ok-try); r=Wafflespeanut
authorNazım Can Altınova <canaltinova@gmail.com>
Wed, 11 Jan 2017 15:47:04 -0800
changeset 340545 b0316707995965a296514fede530c54d710ac914
parent 340544 0f124ce980e4c8266fd49f165cfd463d9c2e82d3
child 340546 25635ed74643a10941b0fc9094e7bf6eaad227f2
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWafflespeanut
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
servo/components/style/values/specified/basic_shape.rs
--- a/servo/components/style/values/specified/basic_shape.rs
+++ b/servo/components/style/values/specified/basic_shape.rs
@@ -234,17 +234,17 @@ impl InsetRect {
         Ok(rect)
     }
 }
 
 impl Parse for InsetRect {
     fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
         match_ignore_ascii_case! { try!(input.expect_function()),
            "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(())
         }
     }
 }
 
 impl ToCss for InsetRect {
     // XXXManishearth again, we should try to reduce the number of values printed here
@@ -409,17 +409,17 @@ impl Circle {
         })
     }
 }
 
 impl Parse for Circle {
     fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
         match_ignore_ascii_case! { try!(input.expect_function()),
            "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(())
         }
     }
 }
 
 impl ToCss for Circle {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
@@ -493,17 +493,17 @@ impl Ellipse {
         })
     }
 }
 
 impl Parse for Ellipse {
     fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
         match_ignore_ascii_case! { try!(input.expect_function()),
            "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(())
         }
     }
 }
 
 impl ToCss for Ellipse {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
@@ -571,17 +571,17 @@ impl Polygon {
         })
     }
 }
 
 impl Parse for Polygon {
     fn parse(context: &ParserContext, input: &mut Parser) -> Result<Self, ()> {
         match_ignore_ascii_case! { try!(input.expect_function()),
            "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(())
         }
     }
 }
 
 impl ToCss for Polygon {
     fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {