mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
script: Use more idiomatic code for resize handling.
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
b319dedda9
commit
755697d6bb
1 changed files with 2 additions and 4 deletions
|
@ -725,10 +725,8 @@ impl ScriptThread {
|
|||
|
||||
for (id, document) in self.documents.borrow().iter() {
|
||||
// Only process a resize if layout is idle.
|
||||
let resize_event = document.window().steal_resize_event();
|
||||
match resize_event {
|
||||
Some((size, size_type)) => resizes.push((id, size, size_type)),
|
||||
None => ()
|
||||
if let Some((size, size_type)) = document.window().steal_resize_event() {
|
||||
resizes.push((id, size, size_type));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue