From e46ac8c8a18e5af1f61a6470c9090b7f4e235d4e Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 6 Feb 2015 12:31:56 +0100 Subject: [PATCH] Replace an and_then call by a map call in ScriptTask::load. --- components/script/script_task.rs | 4 ++-- 1 file 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() }) });