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

@ -32,14 +32,14 @@ impl DOMRectList {
}
}
impl<'a> DOMRectListMethods for &'a DOMRectList {
impl DOMRectListMethods for DOMRectList {
// https://drafts.fxtf.org/geometry/#dom-domrectlist-length
fn Length(self) -> u32 {
fn Length(&self) -> u32 {
self.rects.len() as u32
}
// https://drafts.fxtf.org/geometry/#dom-domrectlist-item
fn Item(self, index: u32) -> Option<Root<DOMRect>> {
fn Item(&self, index: u32) -> Option<Root<DOMRect>> {
let rects = &self.rects;
if index < rects.len() as u32 {
Some(rects[index as usize].root())
@ -49,7 +49,7 @@ impl<'a> DOMRectListMethods for &'a DOMRectList {
}
// check-tidy: no specs after this line
fn IndexedGetter(self, index: u32, found: &mut bool) -> Option<Root<DOMRect>> {
fn IndexedGetter(&self, index: u32, found: &mut bool) -> Option<Root<DOMRect>> {
*found = index < self.rects.len() as u32;
self.Item(index)
}