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

@ -73,20 +73,20 @@ impl TextDecoder {
}
impl<'a> TextDecoderMethods for &'a TextDecoder {
impl TextDecoderMethods for TextDecoder {
// https://encoding.spec.whatwg.org/#dom-textdecoder-encoding
fn Encoding(self) -> DOMString {
fn Encoding(&self) -> DOMString {
self.encoding.whatwg_name().unwrap().to_owned()
}
// https://encoding.spec.whatwg.org/#dom-textdecoder-fatal
fn Fatal(self) -> bool {
fn Fatal(&self) -> bool {
self.fatal
}
#[allow(unsafe_code)]
// https://encoding.spec.whatwg.org/#dom-textdecoder-decode
fn Decode(self, _cx: *mut JSContext, input: Option<*mut JSObject>)
fn Decode(&self, _cx: *mut JSContext, input: Option<*mut JSObject>)
-> Fallible<USVString> {
let input = match input {
Some(input) => input,