Skip to content

Commit 874b56d

Browse files
committed
auto merge of #14524 : ahmedcharles/rust/to_string, r=alexcrichton
2 parents 32b6fc1 + 2dfad3b commit 874b56d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/libcollections/hashmap.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2013,8 +2013,8 @@ mod test_map {
20132013

20142014
let map_str = format!("{}", map);
20152015

2016-
assert!(map_str == "{1: 2, 3: 4}".to_owned() || map_str == "{3: 4, 1: 2}".to_owned());
2017-
assert_eq!(format!("{}", empty), "{}".to_owned());
2016+
assert!(map_str == "{1: 2, 3: 4}".to_string() || map_str == "{3: 4, 1: 2}".to_string());
2017+
assert_eq!(format!("{}", empty), "{}".to_string());
20182018
}
20192019

20202020
#[test]

src/libcollections/treemap.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1366,8 +1366,8 @@ mod test_treemap {
13661366

13671367
let map_str = format!("{}", map);
13681368

1369-
assert!(map_str == "{1: 2, 3: 4}".to_owned());
1370-
assert_eq!(format!("{}", empty), "{}".to_owned());
1369+
assert!(map_str == "{1: 2, 3: 4}".to_string());
1370+
assert_eq!(format!("{}", empty), "{}".to_string());
13711371
}
13721372

13731373
#[test]
@@ -1776,7 +1776,7 @@ mod test_set {
17761776

17771777
let set_str = format!("{}", set);
17781778

1779-
assert!(set_str == "{1, 2}".to_owned());
1780-
assert_eq!(format!("{}", empty), "{}".to_owned());
1779+
assert!(set_str == "{1, 2}".to_string());
1780+
assert_eq!(format!("{}", empty), "{}".to_string());
17811781
}
17821782
}

src/libdebug/repr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ fn test_repr() {
613613
fn exact_test<T>(t: &T, e:&str) {
614614
let mut m = io::MemWriter::new();
615615
write_repr(&mut m as &mut io::Writer, t).unwrap();
616-
let s = str::from_utf8(m.unwrap().as_slice()).unwrap().to_owned();
616+
let s = str::from_utf8(m.unwrap().as_slice()).unwrap().to_string();
617617
assert_eq!(s.as_slice(), e);
618618
}
619619

0 commit comments

Comments
 (0)