mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -70,15 +70,15 @@ impl TextEncoder {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a> TextEncoderMethods for &'a TextEncoder {
|
||||
impl TextEncoderMethods for TextEncoder {
|
||||
// https://encoding.spec.whatwg.org/#dom-textencoder-encoding
|
||||
fn Encoding(self) -> DOMString {
|
||||
fn Encoding(&self) -> DOMString {
|
||||
self.encoding.clone()
|
||||
}
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
// https://encoding.spec.whatwg.org/#dom-textencoder-encode
|
||||
fn Encode(self, cx: *mut JSContext, input: USVString) -> *mut JSObject {
|
||||
fn Encode(&self, cx: *mut JSContext, input: USVString) -> *mut JSObject {
|
||||
unsafe {
|
||||
let encoded = self.encoder.encode(&input.0, EncoderTrap::Strict).unwrap();
|
||||
let length = encoded.len() as u32;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue