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:
Ting-Yu Lin 2023-06-02 02:26:03 +02:00 committed by Oriol Brufau
parent 33ad82c3da
commit a0617bff0d
50 changed files with 486 additions and 340 deletions

View file

@ -10,10 +10,10 @@ use crate::dom::TElement;
use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI};
use crate::invalidation::media_queries::ToMediaListKey;
use crate::shared_lock::SharedRwLockReadGuard;
use crate::stylist::Stylist;
use crate::stylesheet_set::AuthorStylesheetSet;
use crate::stylesheets::StylesheetInDocument;
use crate::stylist::CascadeData;
use crate::stylist::Stylist;
use servo_arc::Arc;
/// A set of author stylesheets and their computed representation, such as the
@ -32,9 +32,7 @@ where
}
lazy_static! {
static ref EMPTY_CASCADE_DATA: Arc<CascadeData> = {
Arc::new_leaked(CascadeData::new())
};
static ref EMPTY_CASCADE_DATA: Arc<CascadeData> = Arc::new_leaked(CascadeData::new());
}
impl<S> AuthorStyles<S>
@ -55,11 +53,8 @@ where
/// TODO(emilio): Need a host element and a snapshot map to do invalidation
/// properly.
#[inline]
pub fn flush<E>(
&mut self,
stylist: &mut Stylist,
guard: &SharedRwLockReadGuard,
) where
pub fn flush<E>(&mut self, stylist: &mut Stylist, guard: &SharedRwLockReadGuard)
where
E: TElement,
S: ToMediaListKey,
{