mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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
|
@ -24,6 +24,8 @@ use string_cache::Atom;
|
|||
|
||||
use url::{Url, UrlParser};
|
||||
|
||||
use std::borrow::ToOwned;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct HTMLImageElement {
|
||||
htmlelement: HTMLElement,
|
||||
|
@ -189,7 +191,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLImageElement> {
|
|||
&atom!("src") => {
|
||||
let window = window_from_node(*self).root();
|
||||
let url = window.r().get_url();
|
||||
self.update_image(Some((attr.value().as_slice().into_string(), &url)));
|
||||
self.update_image(Some((attr.value().as_slice().to_owned(), &url)));
|
||||
},
|
||||
_ => ()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue