mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Switch all callsites of try() to try_parse() in the style crate.
Fully automated via: $ rg -l '\.try\(' | xargs sed -i 's/\.try(/.try_parse(/g' $ cd servo/components/style && cargo +nightly fmt Differential Revision: https://phabricator.services.mozilla.com/D80099
This commit is contained in:
parent
5af0d7ca7c
commit
685e749cfc
56 changed files with 469 additions and 403 deletions
|
@ -101,13 +101,13 @@ impl Parse for CounterStyle {
|
|||
context: &ParserContext,
|
||||
input: &mut Parser<'i, 't>,
|
||||
) -> Result<Self, ParseError<'i>> {
|
||||
if let Ok(name) = input.try(|i| parse_counter_style_name(i)) {
|
||||
if let Ok(name) = input.try_parse(|i| parse_counter_style_name(i)) {
|
||||
return Ok(CounterStyle::Name(name));
|
||||
}
|
||||
input.expect_function_matching("symbols")?;
|
||||
input.parse_nested_block(|input| {
|
||||
let symbols_type = input
|
||||
.try(SymbolsType::parse)
|
||||
.try_parse(SymbolsType::parse)
|
||||
.unwrap_or(SymbolsType::Symbolic);
|
||||
let symbols = Symbols::parse(context, input)?;
|
||||
// There must be at least two symbols for alphabetic or
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue