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.
This commit is contained in:
Pierre Chevalier 2015-10-08 22:58:43 +01:00
parent ab42ca4296
commit 8b5fe88bd3
9 changed files with 24 additions and 24 deletions

View file

@ -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