@@ -100,7 +100,6 @@ mod url;
100100mod util;
101101pub mod types;
102102
103- const CANARY : u32 = 0xdeadbeef ;
104103const TYPEINFO_QUERY : & ' static str = "t" ;
105104
106105/// A type alias of the result returned by many methods.
@@ -398,7 +397,6 @@ struct InnerConnection {
398397 parameters : HashMap < String , String > ,
399398 next_stmt_id : u32 ,
400399 trans_depth : u32 ,
401- canary : u32 ,
402400 desynchronized : bool ,
403401 finished : bool ,
404402}
@@ -433,7 +431,6 @@ impl InnerConnection {
433431 desynchronized : false ,
434432 finished : false ,
435433 trans_depth : 0 ,
436- canary : CANARY ,
437434 } ;
438435
439436 options. push ( ( "client_encoding" . to_owned ( ) , "UTF8" . to_owned ( ) ) ) ;
@@ -797,10 +794,6 @@ impl InnerConnection {
797794 self . desynchronized
798795 }
799796
800- fn canary ( & self ) -> u32 {
801- self . canary
802- }
803-
804797 fn wait_for_ready ( & mut self ) -> Result < ( ) > {
805798 match try!( self . read_message ( ) ) {
806799 ReadyForQuery { .. } => Ok ( ( ) ) ,
@@ -840,7 +833,6 @@ impl InnerConnection {
840833
841834 fn finish_inner ( & mut self ) -> Result < ( ) > {
842835 check_desync ! ( self ) ;
843- self . canary = 0 ;
844836 try!( self . write_messages ( & [ Terminate ] ) ) ;
845837 Ok ( ( ) )
846838 }
@@ -1142,10 +1134,6 @@ impl Connection {
11421134 conn. finish_inner ( )
11431135 }
11441136
1145- fn canary ( & self ) -> u32 {
1146- self . conn . borrow ( ) . canary ( )
1147- }
1148-
11491137 fn write_messages ( & self , messages : & [ FrontendMessage ] ) -> IoResult < ( ) > {
11501138 self . conn . borrow_mut ( ) . write_messages ( messages)
11511139 }
0 commit comments