mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-23 22:05:31 +03:00
Change to_owned() to to_string().
This commit is contained in:
@@ -2013,8 +2013,8 @@ fn test_show() {
|
||||
|
||||
let map_str = format!("{}", map);
|
||||
|
||||
assert!(map_str == "{1: 2, 3: 4}".to_owned() || map_str == "{3: 4, 1: 2}".to_owned());
|
||||
assert_eq!(format!("{}", empty), "{}".to_owned());
|
||||
assert!(map_str == "{1: 2, 3: 4}".to_string() || map_str == "{3: 4, 1: 2}".to_string());
|
||||
assert_eq!(format!("{}", empty), "{}".to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1366,8 +1366,8 @@ fn test_show() {
|
||||
|
||||
let map_str = format!("{}", map);
|
||||
|
||||
assert!(map_str == "{1: 2, 3: 4}".to_owned());
|
||||
assert_eq!(format!("{}", empty), "{}".to_owned());
|
||||
assert!(map_str == "{1: 2, 3: 4}".to_string());
|
||||
assert_eq!(format!("{}", empty), "{}".to_string());
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1776,7 +1776,7 @@ fn test_show() {
|
||||
|
||||
let set_str = format!("{}", set);
|
||||
|
||||
assert!(set_str == "{1, 2}".to_owned());
|
||||
assert_eq!(format!("{}", empty), "{}".to_owned());
|
||||
assert!(set_str == "{1, 2}".to_string());
|
||||
assert_eq!(format!("{}", empty), "{}".to_string());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -613,7 +613,7 @@ fn test_repr() {
|
||||
fn exact_test<T>(t: &T, e:&str) {
|
||||
let mut m = io::MemWriter::new();
|
||||
write_repr(&mut m as &mut io::Writer, t).unwrap();
|
||||
let s = str::from_utf8(m.unwrap().as_slice()).unwrap().to_owned();
|
||||
let s = str::from_utf8(m.unwrap().as_slice()).unwrap().to_string();
|
||||
assert_eq!(s.as_slice(), e);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user