mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Remove as_slice() calls from script.
This commit is contained in:
parent
ef536372cd
commit
a862479ca8
42 changed files with 115 additions and 124 deletions
|
@ -253,7 +253,7 @@ pub fn base64_btoa(input: DOMString) -> Fallible<DOMString> {
|
|||
|
||||
// "and then must apply the base64 algorithm to that sequence of
|
||||
// octets, and return the result. [RFC4648]"
|
||||
Ok(octets.as_slice().to_base64(STANDARD))
|
||||
Ok(octets.to_base64(STANDARD))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,7 +269,7 @@ pub fn base64_atob(input: DOMString) -> Fallible<DOMString> {
|
|||
let without_spaces = input.chars()
|
||||
.filter(|&c| ! is_html_space(c))
|
||||
.collect::<String>();
|
||||
let mut input = without_spaces.as_slice();
|
||||
let mut input = &*without_spaces;
|
||||
|
||||
// "If the length of input divides by 4 leaving no remainder, then:
|
||||
// if input ends with one or two U+003D EQUALS SIGN (=) characters,
|
||||
|
@ -520,7 +520,7 @@ impl<'a, T: Reflectable> ScriptHelpers for JSRef<'a, T> {
|
|||
let this = self.reflector().get_jsobject();
|
||||
let cx = global_object_for_js_object(this).root().r().get_cx();
|
||||
let global = global_object_for_js_object(this).root().r().reflector().get_jsobject();
|
||||
let code: Vec<u16> = code.as_slice().utf16_units().collect();
|
||||
let code: Vec<u16> = code.utf16_units().collect();
|
||||
let mut rval = UndefinedValue();
|
||||
let filename = CString::new(filename).unwrap();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue