diff options
author | bors-servo <release+servo@mozilla.com> | 2014-05-04 01:01:21 -0400 |
---|---|---|
committer | bors-servo <release+servo@mozilla.com> | 2014-05-04 01:01:21 -0400 |
commit | 660f7a016ee75a418afda9e92d45b79eff6ba540 (patch) | |
tree | 64dcd6f6eace86d63688100c37de00ea238262de /src/components/util/str.rs | |
parent | 731e66ff132e41cdc49bc5324c0e15be19c46ec2 (diff) | |
parent | 243814022e06c35c9bcdd99ccd281cb6ed180db0 (diff) | |
download | servo-660f7a016ee75a418afda9e92d45b79eff6ba540.tar.gz servo-660f7a016ee75a418afda9e92d45b79eff6ba540.zip |
auto merge of #2311 : Ms2ger/servo/empty-owned, r=jdm
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() } } |