mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -16,6 +16,8 @@ use dom::node::window_from_node;
|
|||
use servo_util::str::{DOMString, HTML_SPACE_CHARACTERS};
|
||||
use string_cache::Atom;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct DOMTokenList {
|
||||
reflector_: Reflector,
|
||||
|
@ -72,7 +74,7 @@ impl<'a> DOMTokenListMethods for JSRef<'a, DOMTokenList> {
|
|||
// http://dom.spec.whatwg.org/#dom-domtokenlist-item
|
||||
fn Item(self, index: u32) -> Option<DOMString> {
|
||||
self.attribute().root().and_then(|attr| attr.r().value().tokens().and_then(|tokens| {
|
||||
tokens.get(index as uint).map(|token| token.as_slice().into_string())
|
||||
tokens.get(index as uint).map(|token| token.as_slice().to_owned())
|
||||
}))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue