diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-12-27 16:48:27 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-12-31 10:34:44 +0100 |
commit | b6117a57aae0fe39e64417ba9b8afdb2f701c9ef (patch) | |
tree | a071f05b702f07a86b6745119467b9e5aca13977 /components/util/str.rs | |
parent | 37a97f3273c442fa59a3f65e8300a2527b004036 (diff) | |
download | servo-b6117a57aae0fe39e64417ba9b8afdb2f701c9ef.tar.gz servo-b6117a57aae0fe39e64417ba9b8afdb2f701c9ef.zip |
Replace the remaining to_string calls by into_string calls.
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() } } |