mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -529,34 +529,34 @@ pub mod tests {
|
|||
#[test]
|
||||
pub fn test_inline() {
|
||||
let mut v = SmallVec16::new();
|
||||
v.push("hello".to_string());
|
||||
v.push("there".to_string());
|
||||
assert_eq!(v.as_slice(), vec!["hello".to_string(), "there".to_string()].as_slice());
|
||||
v.push("hello".into_string());
|
||||
v.push("there".into_string());
|
||||
assert_eq!(v.as_slice(), vec!["hello".into_string(), "there".into_string()].as_slice());
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_spill() {
|
||||
let mut v = SmallVec2::new();
|
||||
v.push("hello".to_string());
|
||||
v.push("there".to_string());
|
||||
v.push("burma".to_string());
|
||||
v.push("shave".to_string());
|
||||
assert_eq!(v.as_slice(), vec!["hello".to_string(), "there".to_string(), "burma".to_string(), "shave".to_string()].as_slice());
|
||||
v.push("hello".into_string());
|
||||
v.push("there".into_string());
|
||||
v.push("burma".into_string());
|
||||
v.push("shave".into_string());
|
||||
assert_eq!(v.as_slice(), vec!["hello".into_string(), "there".into_string(), "burma".into_string(), "shave".into_string()].as_slice());
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_double_spill() {
|
||||
let mut v = SmallVec2::new();
|
||||
v.push("hello".to_string());
|
||||
v.push("there".to_string());
|
||||
v.push("burma".to_string());
|
||||
v.push("shave".to_string());
|
||||
v.push("hello".to_string());
|
||||
v.push("there".to_string());
|
||||
v.push("burma".to_string());
|
||||
v.push("shave".to_string());
|
||||
v.push("hello".into_string());
|
||||
v.push("there".into_string());
|
||||
v.push("burma".into_string());
|
||||
v.push("shave".into_string());
|
||||
v.push("hello".into_string());
|
||||
v.push("there".into_string());
|
||||
v.push("burma".into_string());
|
||||
v.push("shave".into_string());
|
||||
assert_eq!(v.as_slice(), vec![
|
||||
"hello".to_string(), "there".to_string(), "burma".to_string(), "shave".to_string(), "hello".to_string(), "there".to_string(), "burma".to_string(), "shave".to_string(),
|
||||
"hello".into_string(), "there".into_string(), "burma".into_string(), "shave".into_string(), "hello".into_string(), "there".into_string(), "burma".into_string(), "shave".into_string(),
|
||||
].as_slice());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue