diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 01:53:40 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2017-09-26 09:49:10 +0200 |
commit | f87c2a8d7616112ca924e30292db2d244cf87eec (patch) | |
tree | 7344afe7ec0ec1ac7d1d13f5385111ee9c4be332 /components/script/dom/filelist.rs | |
parent | 577370746e2ce3da7fa25a20b8e1bbeed319df65 (diff) | |
download | servo-f87c2a8d7616112ca924e30292db2d244cf87eec.tar.gz servo-f87c2a8d7616112ca924e30292db2d244cf87eec.zip |
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>,
where Root<T> will be able to handle all the things that need to be
rooted that have a stable traceable address that doesn't move for the
whole lifetime of the root. Stay tuned.
Diffstat (limited to 'components/script/dom/filelist.rs')
-rw-r--r-- | components/script/dom/filelist.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/filelist.rs b/components/script/dom/filelist.rs index 2591419c490..559f36cbd7c 100644 --- a/components/script/dom/filelist.rs +++ b/components/script/dom/filelist.rs @@ -5,7 +5,7 @@ use dom::bindings::codegen::Bindings::FileListBinding; use dom::bindings::codegen::Bindings::FileListBinding::FileListMethods; use dom::bindings::reflector::{Reflector, reflect_dom_object}; -use dom::bindings::root::{Dom, Root}; +use dom::bindings::root::{Dom, DomRoot}; use dom::file::File; use dom::window::Window; use dom_struct::dom_struct; @@ -28,7 +28,7 @@ impl FileList { } #[allow(unrooted_must_root)] - pub fn new(window: &Window, files: Vec<Root<File>>) -> Root<FileList> { + pub fn new(window: &Window, files: Vec<DomRoot<File>>) -> DomRoot<FileList> { reflect_dom_object(box FileList::new_inherited(files.iter().map(|r| Dom::from_ref(&**r)).collect()), window, FileListBinding::Wrap) @@ -46,16 +46,16 @@ impl FileListMethods for FileList { } // https://w3c.github.io/FileAPI/#dfn-item - fn Item(&self, index: u32) -> Option<Root<File>> { + fn Item(&self, index: u32) -> Option<DomRoot<File>> { if (index as usize) < self.list.len() { - Some(Root::from_ref(&*(self.list[index as usize]))) + Some(DomRoot::from_ref(&*(self.list[index as usize]))) } else { None } } // check-tidy: no specs after this line - fn IndexedGetter(&self, index: u32) -> Option<Root<File>> { + fn IndexedGetter(&self, index: u32) -> Option<DomRoot<File>> { self.Item(index) } } |