aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/util/str.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2014-05-03 22:17:45 +0200
committerMs2ger <ms2ger@gmail.com>2014-05-03 22:17:45 +0200
commit243814022e06c35c9bcdd99ccd281cb6ed180db0 (patch)
tree64dcd6f6eace86d63688100c37de00ea238262de /src/components/util/str.rs
parent731e66ff132e41cdc49bc5324c0e15be19c46ec2 (diff)
downloadservo-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.rs4
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()
}
}