diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-01-20 07:54:46 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-01-20 07:54:46 -0700 |
commit | 94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997 (patch) | |
tree | d4982abff1dae6119889edb12e7cc7623105396b /components/util/str.rs | |
parent | 89645391bf42edd9977ed1b6f9b430ad786f209e (diff) | |
parent | 01ed338746ae71493984259335197e6b66daec45 (diff) | |
download | servo-94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997.tar.gz servo-94ebc7c32d5ce58ada3f9d8ffdb60cc025eb5997.zip |
auto merge of #4682 : servo/servo/to_owned, r=jdm
into_string has been removed from Rust.
Diffstat (limited to 'components/util/str.rs')
-rw-r--r-- | components/util/str.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/util/str.rs b/components/util/str.rs index 4cf5a5cc3f4..db5a6328cdb 100644 --- a/components/util/str.rs +++ b/components/util/str.rs @@ -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() } } |