aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-02-06 12:31:56 +0100
committerMs2ger <ms2ger@gmail.com>2015-02-06 12:31:56 +0100
commite46ac8c8a18e5af1f61a6470c9090b7f4e235d4e (patch)
tree289c80509ac2b6b953b87edc84a9577bb0855109 /components/script/script_task.rs
parente85b3b6acb1f651475328369001efd461da681f3 (diff)
downloadservo-e46ac8c8a18e5af1f61a6470c9090b7f4e235d4e.tar.gz
servo-e46ac8c8a18e5af1f61a6470c9090b7f4e235d4e.zip
Replace an and_then call by a map call in ScriptTask::load.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index c3c7f3f0985..2b2b472f7c5 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -781,8 +781,8 @@ impl ScriptTask {
// case, which is wrong. We should be returning an object that
// denies access to most properties (per
// https://github.com/servo/servo/issues/3939#issuecomment-62287025).
- borrowed_page.find(pid).and_then(|page| {
- Some(page.frame.borrow().as_ref().unwrap().window.root())
+ borrowed_page.find(pid).map(|page| {
+ page.frame.borrow().as_ref().unwrap().window.root()
})
});