mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
style: Revert try -> r#try change.
Since we're in an inconsistent state because mako files weren't updated, and it's really really ugly.
This commit is contained in:
parent
155caba595
commit
212b3e1311
47 changed files with 326 additions and 336 deletions
|
@ -114,7 +114,7 @@ impl MediaCondition {
|
|||
|
||||
// ParenthesisBlock.
|
||||
let first_condition = Self::parse_paren_block(context, input)?;
|
||||
let operator = match input.r#try(Operator::parse) {
|
||||
let operator = match input.try(Operator::parse) {
|
||||
Ok(op) => op,
|
||||
Err(..) => return Ok(first_condition),
|
||||
};
|
||||
|
@ -133,7 +133,7 @@ impl MediaCondition {
|
|||
};
|
||||
|
||||
loop {
|
||||
if input.r#try(|i| i.expect_ident_matching(delim)).is_err() {
|
||||
if input.try(|i| i.expect_ident_matching(delim)).is_err() {
|
||||
return Ok(MediaCondition::Operation(
|
||||
conditions.into_boxed_slice(),
|
||||
operator,
|
||||
|
@ -159,7 +159,7 @@ impl MediaCondition {
|
|||
) -> Result<Self, ParseError<'i>> {
|
||||
input.parse_nested_block(|input| {
|
||||
// Base case.
|
||||
if let Ok(inner) = input.r#try(|i| Self::parse(context, i)) {
|
||||
if let Ok(inner) = input.try(|i| Self::parse(context, i)) {
|
||||
return Ok(MediaCondition::InParens(Box::new(inner)));
|
||||
}
|
||||
let expr = MediaFeatureExpression::parse_in_parenthesis_block(context, input)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue