mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +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
|
@ -489,7 +489,7 @@ fn parse_var_function<'i, 't>(
|
|||
let name = parse_name(&name).map_err(|()| {
|
||||
input.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone()))
|
||||
})?;
|
||||
if input.try(|input| input.expect_comma()).is_ok() {
|
||||
if input.try_parse(|input| input.expect_comma()).is_ok() {
|
||||
parse_fallback(input)?;
|
||||
}
|
||||
if let Some(refs) = references {
|
||||
|
@ -505,7 +505,7 @@ fn parse_env_function<'i, 't>(
|
|||
// TODO(emilio): This should be <custom-ident> per spec, but no other
|
||||
// browser does that, see https://github.com/w3c/csswg-drafts/issues/3262.
|
||||
input.expect_ident()?;
|
||||
if input.try(|input| input.expect_comma()).is_ok() {
|
||||
if input.try_parse(|input| input.expect_comma()).is_ok() {
|
||||
parse_fallback(input)?;
|
||||
}
|
||||
if let Some(references) = references {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue