aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/uievent.rs
diff options
context:
space:
mode:
authorPierre Chevalier <pierrechevalier83@gmail.com>2015-10-08 22:58:43 +0100
committerPierre Chevalier <pierrechevalier83@gmail.com>2015-10-08 23:12:20 +0100
commit8b5fe88bd35b663287f7c9d55d7ccaf404a79ac6 (patch)
tree1a7c39f36e1a20c9350c255667dd703f6d769a31 /components/script/dom/uievent.rs
parentab42ca42967354cba08d1dca83aa99a637bd7a6b (diff)
downloadservo-8b5fe88bd35b663287f7c9d55d7ccaf404a79ac6.tar.gz
servo-8b5fe88bd35b663287f7c9d55d7ccaf404a79ac6.zip
Refactor away duplication of get_rooted functionality
Refactor .get().map(Root::from_rooted) and .get().map(|foo| foo.root()) to .get_rooted() on MutNullableHeap objects. First part done mechanically with the following comand: sed -i s/"get().map(Root::from_rooted)"/"get_rooted()"/g *.rs Second part done manually after finding them with git grep ".get().map(" Fixes 7929.
Diffstat (limited to 'components/script/dom/uievent.rs')
-rw-r--r--components/script/dom/uievent.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/uievent.rs b/components/script/dom/uievent.rs
index 599d8a936a3..4c85e7a16f9 100644
--- a/components/script/dom/uievent.rs
+++ b/components/script/dom/uievent.rs
@@ -87,7 +87,7 @@ impl UIEvent {
impl UIEventMethods for UIEvent {
// https://w3c.github.io/uievents/#widl-UIEvent-view
fn GetView(&self) -> Option<Root<Window>> {
- self.view.get().map(Root::from_rooted)
+ self.view.get_rooted()
}
// https://w3c.github.io/uievents/#widl-UIEvent-detail