mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Run rustfmt on servo/components/style and servo/ports/geckolib
This patch is generated by running `cargo +nightly fmt` under `servo/components/style/` and `servo/ports/geckolib` against mozilla-central https://hg.mozilla.org/mozilla-central/rev/b193f2e7a6a5d1f042c957ea4acd5c89bf210512 My nightly version is: 1.58.0-nightly (c9c4b5d72 2021-11-17) Manually remove the redundant braces in author_styles.rs to fix a warning. Differential Revision: https://phabricator.services.mozilla.com/D131556
This commit is contained in:
parent
33ad82c3da
commit
a0617bff0d
50 changed files with 486 additions and 340 deletions
|
@ -93,7 +93,9 @@ impl CssEnvironment {
|
|||
if !device.is_chrome_document() {
|
||||
return None;
|
||||
}
|
||||
let var = CHROME_ENVIRONMENT_VARIABLES.iter().find(|var| var.name == *name)?;
|
||||
let var = CHROME_ENVIRONMENT_VARIABLES
|
||||
.iter()
|
||||
.find(|var| var.name == *name)?;
|
||||
Some((var.evaluator)(device))
|
||||
}
|
||||
}
|
||||
|
@ -682,10 +684,7 @@ impl<'a> CustomPropertiesBuilder<'a> {
|
|||
/// (meaning we should use the inherited value).
|
||||
///
|
||||
/// It does cycle dependencies removal at the same time as substitution.
|
||||
fn substitute_all(
|
||||
custom_properties_map: &mut CustomPropertiesMap,
|
||||
device: &Device,
|
||||
) {
|
||||
fn substitute_all(custom_properties_map: &mut CustomPropertiesMap, device: &Device) {
|
||||
// The cycle dependencies removal in this function is a variant
|
||||
// of Tarjan's algorithm. It is mostly based on the pseudo-code
|
||||
// listed in
|
||||
|
@ -999,7 +998,9 @@ fn substitute_block<'i>(
|
|||
let first_token_type = input
|
||||
.next_including_whitespace_and_comments()
|
||||
.ok()
|
||||
.map_or_else(TokenSerializationType::nothing, |t| t.serialization_type());
|
||||
.map_or_else(TokenSerializationType::nothing, |t| {
|
||||
t.serialization_type()
|
||||
});
|
||||
input.reset(&after_comma);
|
||||
let mut position = (after_comma.position(), first_token_type);
|
||||
last_token_type = substitute_block(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue