Use Iterator::any in collect_old_layers.

This commit is contained in:
Ms2ger 2015-08-13 10:02:33 +02:00
parent 8f55af1190
commit ee702a7135

View file

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