diff options
| author | Ahmed Charles <ahmedcharles@gmail.com> | 2014-05-29 11:59:53 -0700 |
|---|---|---|
| committer | Ahmed Charles <ahmedcharles@gmail.com> | 2014-05-29 12:28:08 -0700 |
| commit | 2dfad3bf520dfde9127724e5f34977b2ebb85eca (patch) | |
| tree | 1987a8c164f3c6e49f0a310ab61f829a0a467aed /src | |
| parent | 50b8528970734adcc654740c51c50094f73dcbee (diff) | |
| download | rust-2dfad3bf520dfde9127724e5f34977b2ebb85eca.tar.gz rust-2dfad3bf520dfde9127724e5f34977b2ebb85eca.zip | |
Change to_owned() to to_string().
Diffstat (limited to 'src')
| -rw-r--r-- | src/libcollections/hashmap.rs | 4 | ||||
| -rw-r--r-- | src/libcollections/treemap.rs | 8 | ||||
| -rw-r--r-- | src/libdebug/repr.rs | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/src/libcollections/hashmap.rs b/src/libcollections/hashmap.rs index 42b57a1ea40..7292f9c47d7 100644 --- a/src/libcollections/hashmap.rs +++ b/src/libcollections/hashmap.rs @@ -2013,8 +2013,8 @@ mod test_map { 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] diff --git a/src/libcollections/treemap.rs b/src/libcollections/treemap.rs index fb663d91131..1ba5fd42bfc 100644 --- a/src/libcollections/treemap.rs +++ b/src/libcollections/treemap.rs @@ -1366,8 +1366,8 @@ mod test_treemap { 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 @@ mod test_set { 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()); } } diff --git a/src/libdebug/repr.rs b/src/libdebug/repr.rs index 6807e73982d..67eee6f2ecf 100644 --- a/src/libdebug/repr.rs +++ b/src/libdebug/repr.rs @@ -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); } |
