Replace the remaining to_string calls by into_string calls.

This commit is contained in:
Ms2ger 2014-12-27 16:48:27 +01:00
parent 37a97f3273
commit b6117a57aa
12 changed files with 43 additions and 42 deletions

View file

@ -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()
}
}