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:
bors-servo 2015-08-13 02:55:10 -06:00
commit 9fda72d60f

View file

@ -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.