aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index a19e071687e..ec98dfff19f 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -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();