diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 10:29:23 +0530 |
|---|---|---|
| committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-02-25 10:29:23 +0530 |
| commit | c950ee93c95d9cfe68ed431bdc45cea67a554757 (patch) | |
| tree | d2a3f8150b83d55a5935c312ff5eaecf9278f599 /src/libcollections/linked_list.rs | |
| parent | 1c97ac3d12074568269d34018ca254ae44fe40b9 (diff) | |
| parent | 870ad3bc75ef25a01b81ff115ab307d21c738a0f (diff) | |
| download | rust-c950ee93c95d9cfe68ed431bdc45cea67a554757.tar.gz rust-c950ee93c95d9cfe68ed431bdc45cea67a554757.zip | |
Rollup merge of #22157 - tbu-:pr_debug_collections, r=alexcrichton
r? @Gankro
Diffstat (limited to 'src/libcollections/linked_list.rs')
| -rw-r--r-- | src/libcollections/linked_list.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs index aa9bd5b0fed..3d68bb13db8 100644 --- a/src/libcollections/linked_list.rs +++ b/src/libcollections/linked_list.rs @@ -918,7 +918,7 @@ impl<A: Clone> Clone for LinkedList<A> { #[stable(feature = "rust1", since = "1.0.0")] impl<A: fmt::Debug> fmt::Debug for LinkedList<A> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - try!(write!(f, "LinkedList [")); + try!(write!(f, "[")); for (i, e) in self.iter().enumerate() { if i != 0 { try!(write!(f, ", ")); } @@ -1387,10 +1387,10 @@ mod tests { #[test] fn test_show() { let list: LinkedList<_> = (0..10).collect(); - assert_eq!(format!("{:?}", list), "LinkedList [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"); + assert_eq!(format!("{:?}", list), "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]"); let list: LinkedList<_> = vec!["just", "one", "test", "more"].iter().cloned().collect(); - assert_eq!(format!("{:?}", list), "LinkedList [\"just\", \"one\", \"test\", \"more\"]"); + assert_eq!(format!("{:?}", list), "[\"just\", \"one\", \"test\", \"more\"]"); } #[cfg(test)] |
