aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filelist.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-08-27 15:08:41 -0600
committerbors-servo <metajack+bors@gmail.com>2015-08-27 15:08:41 -0600
commit71b277d5675556e61a82ae9dbf3105449c3a8275 (patch)
tree89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/filelist.rs
parent856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff)
parent709d347872e37ab2358e057d24557b9977238ecd (diff)
downloadservo-71b277d5675556e61a82ae9dbf3105449c3a8275.tar.gz
servo-71b277d5675556e61a82ae9dbf3105449c3a8275.zip
Auto merge of #7416 - nox:methods-ref, r=frewsxcv
Make the traits for the IDL interfaces take &self <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7416) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/filelist.rs')
-rw-r--r--components/script/dom/filelist.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/filelist.rs b/components/script/dom/filelist.rs
index 6da842ea076..57542b0a51d 100644
--- a/components/script/dom/filelist.rs
+++ b/components/script/dom/filelist.rs
@@ -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