mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Cleanup NodeIterator, Range, ServoHTMLParser, TextEncoder, URLHelper, URL, VirtualMethods
This commit is contained in:
parent
a53b86f107
commit
19241c95f7
13 changed files with 24 additions and 53 deletions
|
@ -65,7 +65,7 @@ impl TextEncoder {
|
|||
}
|
||||
_ => {
|
||||
debug!("Encoding Not UTF");
|
||||
return Err(Range("The encoding must be utf-8, utf-16le, or utf-16be.".to_owned()))
|
||||
Err(Range("The encoding must be utf-8, utf-16le, or utf-16be.".to_owned()))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ impl<'a> TextEncoderMethods for &'a TextEncoder {
|
|||
|
||||
let js_object_data: *mut uint8_t = JS_GetUint8ArrayData(js_object, ptr::null());
|
||||
ptr::copy_nonoverlapping(encoded.as_ptr(), js_object_data, length as usize);
|
||||
return js_object;
|
||||
js_object
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue