aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/str.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/util/str.rs')
-rw-r--r--components/util/str.rs5
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()
}
}