mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Upgrade rayon_croissant to 0.2.0
This commit is contained in:
parent
9edda952c9
commit
1c8d14ac0d
4 changed files with 19 additions and 18 deletions
|
@ -172,14 +172,6 @@ impl BlockContainer {
|
|||
contains_floats: ContainsFloats,
|
||||
outer_content_sizes_of_children: ContentSizes,
|
||||
}
|
||||
impl Default for Accumulator {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
contains_floats: ContainsFloats::No,
|
||||
outer_content_sizes_of_children: ContentSizes::zero(),
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut acc = Accumulator {
|
||||
contains_floats: builder.contains_floats,
|
||||
outer_content_sizes_of_children: ContentSizes::zero(),
|
||||
|
@ -199,13 +191,21 @@ impl BlockContainer {
|
|||
builder
|
||||
.block_level_boxes
|
||||
.into_par_iter()
|
||||
.mapfold_reduce_into(&mut acc, mapfold, |left, right| {
|
||||
left.contains_floats |= right.contains_floats;
|
||||
if content_sizes.requests_inline() {
|
||||
left.outer_content_sizes_of_children
|
||||
.max_assign(&right.outer_content_sizes_of_children)
|
||||
}
|
||||
})
|
||||
.mapfold_reduce_into(
|
||||
&mut acc,
|
||||
mapfold,
|
||||
|| Accumulator {
|
||||
contains_floats: ContainsFloats::No,
|
||||
outer_content_sizes_of_children: ContentSizes::zero(),
|
||||
},
|
||||
|left, right| {
|
||||
left.contains_floats |= right.contains_floats;
|
||||
if content_sizes.requests_inline() {
|
||||
left.outer_content_sizes_of_children
|
||||
.max_assign(&right.outer_content_sizes_of_children)
|
||||
}
|
||||
},
|
||||
)
|
||||
.collect()
|
||||
} else {
|
||||
builder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue