@@ -113,10 +113,12 @@ impl<'a, K, V> Entry<'a, K, V> {
113113
114114impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for Entry < ' _ , K , V > {
115115 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 ( )
120122 }
121123}
122124
@@ -239,7 +241,7 @@ impl<'a, K, V> OccupiedEntry<'a, K, V> {
239241
240242impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for OccupiedEntry < ' _ , K , V > {
241243 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
242- f. debug_struct ( stringify ! ( OccupiedEntry ) )
244+ f. debug_struct ( " OccupiedEntry" )
243245 . field ( "key" , self . key ( ) )
244246 . field ( "value" , self . get ( ) )
245247 . finish ( )
@@ -284,9 +286,7 @@ impl<'a, K, V> VacantEntry<'a, K, V> {
284286
285287impl < K : fmt:: Debug , V > fmt:: Debug for VacantEntry < ' _ , K , V > {
286288 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 ( )
290290 }
291291}
292292
@@ -387,7 +387,7 @@ impl<'a, K, V> IndexedEntry<'a, K, V> {
387387
388388impl < K : fmt:: Debug , V : fmt:: Debug > fmt:: Debug for IndexedEntry < ' _ , K , V > {
389389 fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
390- f. debug_struct ( stringify ! ( IndexedEntry ) )
390+ f. debug_struct ( " IndexedEntry" )
391391 . field ( "index" , & self . index )
392392 . field ( "key" , self . key ( ) )
393393 . field ( "value" , self . get ( ) )
0 commit comments