4343//! }
4444//! ```
4545#![ doc( html_root_url="https://sfackler.github.io/rust-postgres/doc" ) ]
46- #![ feature( unsafe_destructor, io, core, debug_builders , str_char) ]
46+ #![ feature( unsafe_destructor, io, core, str_char) ]
4747#![ cfg_attr( feature = "unix_socket" , feature( convert) ) ]
4848#![ warn( missing_docs) ]
4949
@@ -55,7 +55,9 @@ extern crate phf;
5555extern crate rustc_serialize as serialize;
5656#[ cfg( feature = "unix_socket" ) ]
5757extern crate unix_socket;
58+ extern crate debug_builders;
5859
60+ use debug_builders:: DebugStruct ;
5961use openssl:: crypto:: hash:: { self , Hasher } ;
6062use openssl:: ssl:: { SslContext , MaybeSslStream } ;
6163use serialize:: hex:: ToHex ;
@@ -249,7 +251,7 @@ pub struct Notifications<'conn> {
249251
250252impl < ' a > fmt:: Debug for Notifications < ' a > {
251253 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
252- fmt . debug_struct ( "Notifications" )
254+ DebugStruct :: new ( fmt , "Notifications" )
253255 . field ( "pending" , & self . conn . conn . borrow ( ) . notifications . len ( ) )
254256 . finish ( )
255257 }
@@ -876,7 +878,7 @@ pub struct Connection {
876878impl fmt:: Debug for Connection {
877879 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
878880 let conn = self . conn . borrow ( ) ;
879- fmt . debug_struct ( "Connection" )
881+ DebugStruct :: new ( fmt , "Connection" )
880882 . field ( "cancel_data" , & conn. cancel_data )
881883 . field ( "notifications" , & conn. notifications . len ( ) )
882884 . field ( "transaction_depth" , & conn. trans_depth )
@@ -1189,7 +1191,7 @@ pub struct Transaction<'conn> {
11891191
11901192impl < ' a > fmt:: Debug for Transaction < ' a > {
11911193 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1192- fmt . debug_struct ( "Transaction" )
1194+ DebugStruct :: new ( fmt , "Transaction" )
11931195 . field ( "commit" , & self . commit . get ( ) )
11941196 . field ( "depth" , & self . depth )
11951197 . finish ( )
@@ -1320,7 +1322,7 @@ pub struct Statement<'conn> {
13201322
13211323impl < ' a > fmt:: Debug for Statement < ' a > {
13221324 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1323- fmt . debug_struct ( "Statement" )
1325+ DebugStruct :: new ( fmt , "Statement" )
13241326 . field ( "name" , & self . name )
13251327 . field ( "parameter_types" , & self . param_types )
13261328 . field ( "columns" , & self . columns )
@@ -1625,7 +1627,7 @@ pub struct Rows<'stmt> {
16251627
16261628impl < ' a > fmt:: Debug for Rows < ' a > {
16271629 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1628- fmt . debug_struct ( "Rows" )
1630+ DebugStruct :: new ( fmt , "Rows" )
16291631 . field ( "columns" , & self . columns ( ) )
16301632 . field ( "rows" , & self . data . len ( ) )
16311633 . finish ( )
@@ -1768,7 +1770,7 @@ pub struct Row<'a> {
17681770
17691771impl < ' a > fmt:: Debug for Row < ' a > {
17701772 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1771- fmt . debug_struct ( "Row" )
1773+ DebugStruct :: new ( fmt , "Row" )
17721774 . field ( "statement" , self . stmt )
17731775 . finish ( )
17741776 }
@@ -1889,7 +1891,7 @@ impl<'a, 'b> Drop for LazyRows<'a, 'b> {
18891891
18901892impl < ' a , ' b > fmt:: Debug for LazyRows < ' a , ' b > {
18911893 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1892- fmt . debug_struct ( "LazyRows" )
1894+ DebugStruct :: new ( fmt , "LazyRows" )
18931895 . field ( "name" , & self . name )
18941896 . field ( "row_limit" , & self . row_limit )
18951897 . field ( "remaining_rows" , & self . data . len ( ) )
@@ -1970,7 +1972,7 @@ pub struct CopyInStatement<'a> {
19701972
19711973impl < ' a > fmt:: Debug for CopyInStatement < ' a > {
19721974 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
1973- fmt . debug_struct ( "CopyInStatement" )
1975+ DebugStruct :: new ( fmt , "CopyInStatement" )
19741976 . field ( "name" , & self . name )
19751977 . field ( "column_types" , & self . column_types )
19761978 . finish ( )
0 commit comments