File tree 1 file changed +18
-2
lines changed
library/alloc/src/collections
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> {
64
64
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
65
65
impl < T : fmt:: Debug > fmt:: Debug for Iter < ' _ , T > {
66
66
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 ( )
68
76
}
69
77
}
70
78
@@ -91,7 +99,15 @@ pub struct IterMut<'a, T: 'a> {
91
99
#[ stable( feature = "collection_debug" , since = "1.17.0" ) ]
92
100
impl < T : fmt:: Debug > fmt:: Debug for IterMut < ' _ , T > {
93
101
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 ( )
95
111
}
96
112
}
97
113
You can’t perform that action at this time.
0 commit comments