diff options
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 4ada243391c..2344c8655d4 100644 --- a/components/util/str.rs +++ b/components/util/str.rs @@ -16,10 +16,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 "".to_string() even for Some. + // We don't use map_default because it would allocate "".into_string() even + // for Some. match *s { Some(ref s) => s.clone(), - None => "".to_string() + None => "".into_string() } } |