mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Move to to_owned rather than into_string.
into_string has been removed from Rust.
This commit is contained in:
parent
2d5b0e0855
commit
01ed338746
67 changed files with 473 additions and 383 deletions
|
@ -23,6 +23,8 @@ use dom::virtualmethods::VirtualMethods;
|
|||
use servo_util::str::DOMString;
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLSelectElement {
|
||||
htmlelement: HTMLElement
|
||||
|
@ -68,9 +70,9 @@ impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
|
|||
fn Type(self) -> DOMString {
|
||||
let elem: JSRef<Element> = ElementCast::from_ref(self);
|
||||
if elem.has_attribute(&atom!("multiple")) {
|
||||
"select-multiple".into_string()
|
||||
"select-multiple".to_owned()
|
||||
} else {
|
||||
"select-one".into_string()
|
||||
"select-one".to_owned()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue