mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Replace the remaining to_string calls by into_string calls.
This commit is contained in:
parent
37a97f3273
commit
b6117a57aa
12 changed files with 43 additions and 42 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue