mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace an and_then call by a map call in ScriptTask::load.
This commit is contained in:
parent
e85b3b6acb
commit
e46ac8c8a1
1 changed files with 2 additions and 2 deletions
|
@ -781,8 +781,8 @@ impl ScriptTask {
|
||||||
// case, which is wrong. We should be returning an object that
|
// case, which is wrong. We should be returning an object that
|
||||||
// denies access to most properties (per
|
// denies access to most properties (per
|
||||||
// https://github.com/servo/servo/issues/3939#issuecomment-62287025).
|
// https://github.com/servo/servo/issues/3939#issuecomment-62287025).
|
||||||
borrowed_page.find(pid).and_then(|page| {
|
borrowed_page.find(pid).map(|page| {
|
||||||
Some(page.frame.borrow().as_ref().unwrap().window.root())
|
page.frame.borrow().as_ref().unwrap().window.root()
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue