mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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
|
@ -17,6 +17,8 @@ use dom::window::Window;
|
|||
use parse::html::{HTMLInput, parse_html};
|
||||
use servo_util::str::DOMString;
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct DOMParser {
|
||||
reflector_: Reflector,
|
||||
|
@ -49,7 +51,7 @@ impl<'a> DOMParserMethods for JSRef<'a, DOMParser> {
|
|||
-> Fallible<Temporary<Document>> {
|
||||
let window = self.window.root();
|
||||
let url = window.r().get_url();
|
||||
let content_type = DOMParserBinding::SupportedTypeValues::strings[ty as uint].into_string();
|
||||
let content_type = DOMParserBinding::SupportedTypeValues::strings[ty as uint].to_owned();
|
||||
match ty {
|
||||
Text_html => {
|
||||
let document = Document::new(window.r(), Some(url.clone()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue