Move to to_owned rather than into_string.

into_string has been removed from Rust.
This commit is contained in:
Ms2ger 2015-01-20 14:45:36 +01:00
parent 2d5b0e0855
commit 01ed338746
67 changed files with 473 additions and 383 deletions

View file

@ -106,13 +106,14 @@ macro_rules! make_enumerated_getter(
use dom::bindings::codegen::InheritTypes::ElementCast;
#[allow(unused_imports)]
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
let element: JSRef<Element> = ElementCast::from_ref(self);
let val = element.get_string_attribute(&Atom::from_slice($htmlname))
.into_ascii_lower();
// https://html.spec.whatwg.org/multipage/forms.html#attr-fs-method
match val.as_slice() {
$($choices)|+ => val,
_ => $default.into_string()
_ => $default.to_owned()
}
}
);