mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make the traits for the IDL interfaces take &self
This commit is contained in:
parent
856fda7f2e
commit
709d347872
99 changed files with 1192 additions and 1192 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue