mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Use Iterator::any in collect_old_layers.
This commit is contained in:
parent
8f55af1190
commit
ee702a7135
1 changed files with 2 additions and 2 deletions
|
@ -302,9 +302,9 @@ impl CompositorLayer for Layer<CompositorData> {
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
// Keep this layer if it exists in the new layer list.
|
// Keep this layer if it exists in the new layer list.
|
||||||
let keep_layer = new_layers.iter().position(|properties| {
|
let keep_layer = new_layers.iter().any(|properties| {
|
||||||
properties.id == extra_data.id
|
properties.id == extra_data.id
|
||||||
}).is_some();
|
});
|
||||||
|
|
||||||
// When removing a layer, clear any tiles and surfaces
|
// When removing a layer, clear any tiles and surfaces
|
||||||
// associated with the layer.
|
// associated with the layer.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue