diff options
Diffstat (limited to 'src/components/util/str.rs')
-rw-r--r-- | src/components/util/str.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components/util/str.rs b/src/components/util/str.rs index abd5984b8ef..be5eab6ea52 100644 --- a/src/components/util/str.rs +++ b/src/components/util/str.rs @@ -10,10 +10,10 @@ 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 ~"" even for Some. + // We don't use map_default because it would allocate "".to_owned() even for Some. match *s { Some(ref s) => s.clone(), - None => ~"" + None => "".to_owned() } } |