diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-11-27 19:09:59 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-06 23:53:02 -0500 |
| commit | 98ae63753bc6c2efe1c8ed50d45e665db686cde7 (patch) | |
| tree | 0a9aced79cc16baba1fb00e83cabf00a4550e43f /src/libcollections/string.rs | |
| parent | 976660f3f73a2dba68695fce1b697f7694af0a23 (diff) | |
| download | rust-98ae63753bc6c2efe1c8ed50d45e665db686cde7.tar.gz rust-98ae63753bc6c2efe1c8ed50d45e665db686cde7.zip | |
libcollections: remove unnecessary `to_string()` calls
Diffstat (limited to 'src/libcollections/string.rs')
| -rw-r--r-- | src/libcollections/string.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index a7545d06960..571f3fa4685 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -1287,24 +1287,24 @@ mod tests { #[test] fn test_simple_types() { - assert_eq!(1i.to_string(), "1".to_string()); - assert_eq!((-1i).to_string(), "-1".to_string()); - assert_eq!(200u.to_string(), "200".to_string()); - assert_eq!(2u8.to_string(), "2".to_string()); - assert_eq!(true.to_string(), "true".to_string()); - assert_eq!(false.to_string(), "false".to_string()); - assert_eq!(().to_string(), "()".to_string()); - assert_eq!(("hi".to_string()).to_string(), "hi".to_string()); + assert_eq!(1i.to_string(), "1"); + assert_eq!((-1i).to_string(), "-1"); + assert_eq!(200u.to_string(), "200"); + assert_eq!(2u8.to_string(), "2"); + assert_eq!(true.to_string(), "true"); + assert_eq!(false.to_string(), "false"); + assert_eq!(().to_string(), "()"); + assert_eq!(("hi".to_string()).to_string(), "hi"); } #[test] fn test_vectors() { let x: Vec<int> = vec![]; - assert_eq!(x.to_string(), "[]".to_string()); - assert_eq!((vec![1i]).to_string(), "[1]".to_string()); - assert_eq!((vec![1i, 2, 3]).to_string(), "[1, 2, 3]".to_string()); + assert_eq!(x.to_string(), "[]"); + assert_eq!((vec![1i]).to_string(), "[1]"); + assert_eq!((vec![1i, 2, 3]).to_string(), "[1, 2, 3]"); assert!((vec![vec![], vec![1i], vec![1i, 1]]).to_string() == - "[[], [1], [1, 1]]".to_string()); + "[[], [1], [1, 1]]"); } #[bench] |
