File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
library/alloc/src/collections Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,15 @@ pub struct Iter<'a, T: 'a> {
6464#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
6565impl < T : fmt:: Debug > fmt:: Debug for Iter < ' _ , T > {
6666 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
67- f. debug_tuple ( "Iter" ) . field ( & self . len ) . finish ( )
67+ f. debug_tuple ( "Iter" )
68+ . field ( & * mem:: ManuallyDrop :: new ( LinkedList {
69+ head : self . head ,
70+ tail : self . tail ,
71+ len : self . len ,
72+ marker : PhantomData ,
73+ } ) )
74+ . field ( & self . len )
75+ . finish ( )
6876 }
6977}
7078
@@ -91,7 +99,15 @@ pub struct IterMut<'a, T: 'a> {
9199#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
92100impl < T : fmt:: Debug > fmt:: Debug for IterMut < ' _ , T > {
93101 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
94- f. debug_tuple ( "IterMut" ) . field ( & self . len ) . finish ( )
102+ f. debug_tuple ( "IterMut" )
103+ . field ( & * mem:: ManuallyDrop :: new ( LinkedList {
104+ head : self . head ,
105+ tail : self . tail ,
106+ len : self . len ,
107+ marker : PhantomData ,
108+ } ) )
109+ . field ( & self . len )
110+ . finish ( )
95111 }
96112}
97113
You can’t perform that action at this time.
0 commit comments