Make the traits for the IDL interfaces take &self

This commit is contained in:
Anthony Ramine 2015-08-27 22:15:54 +02:00
parent 856fda7f2e
commit 709d347872
99 changed files with 1192 additions and 1192 deletions

View file

@ -30,19 +30,19 @@ impl FileList {
}
}
impl<'a> FileListMethods for &'a FileList {
impl FileListMethods for FileList {
// https://w3c.github.io/FileAPI/#dfn-length
fn Length(self) -> u32 {
fn Length(&self) -> u32 {
self.list.len() as u32
}
// https://w3c.github.io/FileAPI/#dfn-item
fn Item(self, index: u32) -> Option<Root<File>> {
fn Item(&self, index: u32) -> Option<Root<File>> {
Some(self.list[index as usize].root())
}
// check-tidy: no specs after this line
fn IndexedGetter(self, index: u32, found: &mut bool) -> Option<Root<File>> {
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<File>> {
let item = self.Item(index);
*found = item.is_some();
item