Remove as_slice() calls from script.

This commit is contained in:
Ms2ger 2015-04-25 17:05:08 +02:00
parent ef536372cd
commit a862479ca8
42 changed files with 115 additions and 124 deletions

View file

@ -83,7 +83,7 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> {
let elem: JSRef<Element> = ElementCast::from_ref(self);
let ty = elem.get_string_attribute(&atom!("type")).into_ascii_lowercase();
// https://html.spec.whatwg.org/multipage/#attr-button-type
match ty.as_slice() {
match &*ty {
"reset" | "button" | "menu" => ty,
_ => "submit".to_owned()
}