Untry style

This commit is contained in:
Simon Sapin 2017-06-18 12:40:03 +02:00
parent 4c5f7bfaa3
commit a5bb55790f
45 changed files with 518 additions and 527 deletions

View file

@ -230,7 +230,7 @@ impl Resolution {
}
fn parse<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
let (value, unit) = match try!(input.next()) {
let (value, unit) = match input.next()? {
Token::Dimension { value, unit, .. } => {
(value, unit)
},
@ -462,9 +462,9 @@ impl Expression {
/// ```
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
-> Result<Self, ParseError<'i>> {
try!(input.expect_parenthesis_block());
input.expect_parenthesis_block()?;
input.parse_nested_block(|input| {
let ident = try!(input.expect_ident());
let ident = input.expect_ident()?;
let mut flags = 0;
let result = {