diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-05-03 22:17:45 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-05-03 22:17:45 +0200 |
commit | 243814022e06c35c9bcdd99ccd281cb6ed180db0 (patch) | |
tree | 64dcd6f6eace86d63688100c37de00ea238262de /src/components/util/str.rs | |
parent | 731e66ff132e41cdc49bc5324c0e15be19c46ec2 (diff) | |
download | servo-243814022e06c35c9bcdd99ccd281cb6ed180db0.tar.gz servo-243814022e06c35c9bcdd99ccd281cb6ed180db0.zip |
Replace all ~"" with "".to_owned().
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() } } |