Remove remaining as_slice / as_mut_slice calls.

This commit is contained in:
Ms2ger 2015-04-28 19:25:46 +02:00
parent 903305416a
commit 024323004d
3 changed files with 4 additions and 4 deletions

View file

@ -242,11 +242,11 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLCanvasElement> {
let value = attr.value();
let recreate = match attr.local_name() {
&atom!("width") => {
self.width.set(parse_unsigned_integer(value.as_slice().chars()).unwrap_or(DEFAULT_WIDTH));
self.width.set(parse_unsigned_integer(value.chars()).unwrap_or(DEFAULT_WIDTH));
true
}
&atom!("height") => {
self.height.set(parse_unsigned_integer(value.as_slice().chars()).unwrap_or(DEFAULT_HEIGHT));
self.height.set(parse_unsigned_integer(value.chars()).unwrap_or(DEFAULT_HEIGHT));
true
}
_ => false,

View file

@ -854,7 +854,7 @@ impl<'a> Activatable for JSRef<'a, HTMLInputElement> {
.filter_map(HTMLInputElementCast::to_temporary)
.filter(|input| {
let input = input.root();
input.r().form_owner() == owner && match input.r().Type().as_slice() {
input.r().form_owner() == owner && match &*input.r().Type() {
"text" | "search" | "url" | "tel" |
"email" | "password" | "datetime" |
"date" | "month" | "week" | "time" |