mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #7187 - Ms2ger:use-any, r=SimonSapin
Use Iterator::any in collect_old_layers. <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7187) <!-- Reviewable:end -->
This commit is contained in:
commit
9fda72d60f
1 changed files with 2 additions and 2 deletions
|
@ -302,9 +302,9 @@ impl CompositorLayer for Layer<CompositorData> {
|
|||
true
|
||||
} else {
|
||||
// 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
|
||||
}).is_some();
|
||||
});
|
||||
|
||||
// When removing a layer, clear any tiles and surfaces
|
||||
// associated with the layer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue