]> git.lizzy.rs Git - rust.git/blobdiff - src/test/run-pass/vec-to_str.rs
std: Rename Show/String to Debug/Display
[rust.git] / src / test / run-pass / vec-to_str.rs
index 52e0ba89479f555340f95043ad9b916573f84a67..31f2612624201785eec0d1ce35c952e09a48e791 100644 (file)
@@ -9,11 +9,11 @@
 // except according to those terms.
 
 pub fn main() {
-    assert_eq!((vec!(0i, 1)).to_string(), "[0, 1]".to_string());
+    assert_eq!(format!("{:?}", vec!(0i, 1)), "[0, 1]".to_string());
 
     let foo = vec!(3i, 4);
     let bar: &[int] = &[4, 5];
 
-    assert_eq!(foo.to_string(), "[3, 4]".to_string());
-    assert_eq!(bar.to_string(), "[4, 5]".to_string());
+    assert_eq!(format!("{:?}", foo), "[3, 4]");
+    assert_eq!(format!("{:?}", bar), "[4, 5]");
 }