From 7768f82af043048f92e491089922a0af06c8d719 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 11 Aug 2024 17:12:29 +0200 Subject: [PATCH] Bug 1912663 - Fix some build issues with cbindgen 0.27 --- servo/components/style_traits/values.rs | 16 ++++++++-------- servo/ports/geckolib/cbindgen.toml | 1 - 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/servo/components/style_traits/values.rs b/servo/components/style_traits/values.rs index b6d92fe869b7..ac2355be77a2 100644 --- a/servo/components/style_traits/values.rs +++ b/servo/components/style_traits/values.rs @@ -374,11 +374,11 @@ impl Separator for Space { where F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result>, { - input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. + input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. let mut results = vec![parse_one(input)?]; loop { - input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. - if let Ok(item) = input.try(&mut parse_one) { + input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. + if let Ok(item) = input.try_parse(&mut parse_one) { results.push(item); } else { return Ok(results); @@ -399,14 +399,14 @@ impl Separator for CommaWithSpace { where F: for<'tt> FnMut(&mut Parser<'i, 'tt>) -> Result>, { - input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. + input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. let mut results = vec![parse_one(input)?]; loop { - input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. + input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. let comma_location = input.current_source_location(); - let comma = input.try(|i| i.expect_comma()).is_ok(); - input.skip_whitespace(); // Unnecessary for correctness, but may help try() rewind less. - if let Ok(item) = input.try(&mut parse_one) { + let comma = input.try_parse(|i| i.expect_comma()).is_ok(); + input.skip_whitespace(); // Unnecessary for correctness, but may help try_parse() rewind less. + if let Ok(item) = input.try_parse(&mut parse_one) { results.push(item); } else if comma { return Err(comma_location.new_unexpected_token_error(Token::Comma)); diff --git a/servo/ports/geckolib/cbindgen.toml b/servo/ports/geckolib/cbindgen.toml index e1990b20caa3..23b3f4b690ca 100644 --- a/servo/ports/geckolib/cbindgen.toml +++ b/servo/ports/geckolib/cbindgen.toml @@ -318,7 +318,6 @@ renaming_overrides_prefixing = true "Keyframe" = "Keyframe" "nsChangeHint" = "nsChangeHint" "ServoElementSnapshotTable" = "ServoElementSnapshotTable" -"Keyframe" = "Keyframe" "ComputedKeyframeValues" = "ComputedKeyframeValues" "OriginFlags" = "OriginFlags" "ServoTraversalFlags" = "ServoTraversalFlags" -- 2.47.0