mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Indent properly a couple more functions.
This commit is contained in:
parent
a6c6ef91e0
commit
13f61a6e5f
5 changed files with 46 additions and 31 deletions
|
@ -77,9 +77,11 @@ type WorkUnit<N> = ArrayVec<[SendNode<N>; WORK_UNIT_MAX]>;
|
|||
#[inline(never)]
|
||||
fn create_thread_local_context<'scope, E, D>(
|
||||
traversal: &'scope D,
|
||||
slot: &mut Option<ThreadLocalStyleContext<E>>)
|
||||
where E: TElement + 'scope,
|
||||
D: DomTraversal<E>
|
||||
slot: &mut Option<ThreadLocalStyleContext<E>>,
|
||||
)
|
||||
where
|
||||
E: TElement + 'scope,
|
||||
D: DomTraversal<E>,
|
||||
{
|
||||
*slot = Some(ThreadLocalStyleContext::new(traversal.shared_context()));
|
||||
}
|
||||
|
@ -99,15 +101,18 @@ fn create_thread_local_context<'scope, E, D>(
|
|||
/// a thread-local cache to share styles between siblings.
|
||||
#[inline(always)]
|
||||
#[allow(unsafe_code)]
|
||||
fn top_down_dom<'a, 'scope, E, D>(nodes: &'a [SendNode<E::ConcreteNode>],
|
||||
root: OpaqueNode,
|
||||
mut traversal_data: PerLevelTraversalData,
|
||||
scope: &'a rayon::Scope<'scope>,
|
||||
pool: &'scope rayon::ThreadPool,
|
||||
traversal: &'scope D,
|
||||
tls: &'scope ScopedTLS<'scope, ThreadLocalStyleContext<E>>)
|
||||
where E: TElement + 'scope,
|
||||
D: DomTraversal<E>,
|
||||
fn top_down_dom<'a, 'scope, E, D>(
|
||||
nodes: &'a [SendNode<E::ConcreteNode>],
|
||||
root: OpaqueNode,
|
||||
mut traversal_data: PerLevelTraversalData,
|
||||
scope: &'a rayon::Scope<'scope>,
|
||||
pool: &'scope rayon::ThreadPool,
|
||||
traversal: &'scope D,
|
||||
tls: &'scope ScopedTLS<'scope, ThreadLocalStyleContext<E>>,
|
||||
)
|
||||
where
|
||||
E: TElement + 'scope,
|
||||
D: DomTraversal<E>,
|
||||
{
|
||||
debug_assert!(nodes.len() <= WORK_UNIT_MAX);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue