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

@ -6,6 +6,7 @@ use geometry::Au;
use cssparser::{mod, RGBA, Color};
use std::ascii::AsciiExt;
use std::borrow::ToOwned;
use std::iter::Filter;
use std::num::Int;
use std::str::{CharEq, CharSplits, FromStr};
@ -16,11 +17,11 @@ pub type StaticCharVec = &'static [char];
pub type StaticStringVec = &'static [&'static str];
pub fn null_str_as_empty(s: &Option<DOMString>) -> DOMString {
// We don't use map_default because it would allocate "".into_string() even
// We don't use map_default because it would allocate "".to_owned() even
// for Some.
match *s {
Some(ref s) => s.clone(),
None => "".into_string()
None => "".to_owned()
}
}