aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filereader.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/filereader.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/filereader.rs')
-rw-r--r--components/script/dom/filereader.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 219f1a2c1de..3ae20361ab6 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -302,7 +302,7 @@ impl FileReaderMethods for FileReader {
// https://w3c.github.io/FileAPI/#dfn-error
fn GetError(&self) -> Option<Root<DOMException>> {
- self.error.get().map(|error| error.root())
+ self.error.get_rooted()
}
// https://w3c.github.io/FileAPI/#dfn-result