diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 22:15:54 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2015-08-27 22:27:43 +0200 |
commit | 709d347872e37ab2358e057d24557b9977238ecd (patch) | |
tree | 89f726bf207325eea8a8ca316f6d77d8c88432cb /components/script/dom/blob.rs | |
parent | 856fda7f2e3fe4abd6de247e8bdaf8cedf3764c2 (diff) | |
download | servo-709d347872e37ab2358e057d24557b9977238ecd.tar.gz servo-709d347872e37ab2358e057d24557b9977238ecd.zip |
Make the traits for the IDL interfaces take &self
Diffstat (limited to 'components/script/dom/blob.rs')
-rw-r--r-- | components/script/dom/blob.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/script/dom/blob.rs b/components/script/dom/blob.rs index 4c3cda4715e..23b9965a9f6 100644 --- a/components/script/dom/blob.rs +++ b/components/script/dom/blob.rs @@ -86,9 +86,9 @@ impl Blob { } } -impl<'a> BlobMethods for &'a Blob { +impl BlobMethods for Blob { // https://dev.w3.org/2006/webapi/FileAPI/#dfn-size - fn Size(self) -> u64 { + fn Size(&self) -> u64 { match self.bytes { None => 0, Some(ref bytes) => bytes.len() as u64 @@ -96,12 +96,12 @@ impl<'a> BlobMethods for &'a Blob { } // https://dev.w3.org/2006/webapi/FileAPI/#dfn-type - fn Type(self) -> DOMString { + fn Type(&self) -> DOMString { self.typeString.clone() } // https://dev.w3.org/2006/webapi/FileAPI/#slice-method-algo - fn Slice(self, start: Option<i64>, end: Option<i64>, + fn Slice(&self, start: Option<i64>, end: Option<i64>, contentType: Option<DOMString>) -> Root<Blob> { let size: i64 = self.Size().to_i64().unwrap(); let relativeStart: i64 = match start { @@ -149,12 +149,12 @@ impl<'a> BlobMethods for &'a Blob { } // https://dev.w3.org/2006/webapi/FileAPI/#dfn-isClosed - fn IsClosed(self) -> bool { + fn IsClosed(&self) -> bool { self.isClosed_.get() } // https://dev.w3.org/2006/webapi/FileAPI/#dfn-close - fn Close(self) { + fn Close(&self) { // Step 1 if self.isClosed_.get() { return; |