@@ -113,10 +113,12 @@ impl<'a, K, V> Entry<'a, K, V> {
113
113
114
114
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for Entry < ' _ , K , V > {
115
115
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
116
- match * self {
117
- Entry :: Vacant ( ref v) => f. debug_tuple ( stringify ! ( Entry ) ) . field ( v) . finish ( ) ,
118
- Entry :: Occupied ( ref o) => f. debug_tuple ( stringify ! ( Entry ) ) . field ( o) . finish ( ) ,
119
- }
116
+ let mut tuple = f. debug_tuple ( "Entry" ) ;
117
+ match self {
118
+ Entry :: Vacant ( v) => tuple. field ( v) ,
119
+ Entry :: Occupied ( o) => tuple. field ( o) ,
120
+ } ;
121
+ tuple. finish ( )
120
122
}
121
123
}
122
124
@@ -239,7 +241,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
239
241
240
242
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for OccupiedEntry < ' _ , K , V > {
241
243
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
242
- f. debug_struct ( stringify ! ( OccupiedEntry ) )
244
+ f. debug_struct ( " OccupiedEntry" )
243
245
. field ( "key" , self . key ( ) )
244
246
. field ( "value" , self . get ( ) )
245
247
. finish ( )
@@ -284,9 +286,7 @@ impl<'a, K, V> VacantEntry<'a, K, V> {
284
286
285
287
impl < K : fmt:: Debug , V > fmt:: Debug for VacantEntry < ' _ , K , V > {
286
288
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
287
- f. debug_tuple ( stringify ! ( VacantEntry ) )
288
- . field ( self . key ( ) )
289
- . finish ( )
289
+ f. debug_tuple ( "VacantEntry" ) . field ( self . key ( ) ) . finish ( )
290
290
}
291
291
}
292
292
@@ -387,7 +387,7 @@ impl<'a, K, V> IndexedEntry<'a, K, V> {
387
387
388
388
impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for IndexedEntry < ' _ , K , V > {
389
389
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
390
- f. debug_struct ( stringify ! ( IndexedEntry ) )
390
+ f. debug_struct ( " IndexedEntry" )
391
391
. field ( "index" , & self . index )
392
392
. field ( "key" , self . key ( ) )
393
393
. field ( "value" , self . get ( ) )
0 commit comments