@@ -7,9 +7,6 @@ use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt};
77use types:: Oid ;
88use priv_io:: StreamOptions ;
99
10- pub const CANCEL_CODE : u32 = 80877102 ;
11- pub const SSL_CODE : u32 = 80877103 ;
12-
1310pub enum Backend {
1411 AuthenticationCleartextPassword ,
1512 AuthenticationGSS ,
@@ -85,11 +82,6 @@ pub struct RowDescriptionEntry {
8582}
8683
8784pub enum Frontend < ' a > {
88- CancelRequest {
89- code : u32 ,
90- process_id : u32 ,
91- secret_key : u32 ,
92- } ,
9385 CopyData {
9486 data : & ' a [ u8 ] ,
9587 } ,
@@ -101,9 +93,6 @@ pub enum Frontend<'a> {
10193 portal : & ' a str ,
10294 max_rows : i32 ,
10395 } ,
104- SslRequest {
105- code : u32 ,
106- } ,
10796 Sync ,
10897}
10998
@@ -128,14 +117,9 @@ impl<W: Write> WriteMessage for W {
128117 #[ allow( cyclomatic_complexity) ]
129118 fn write_message ( & mut self , message : & Frontend ) -> io:: Result < ( ) > {
130119 let mut buf = vec ! [ ] ;
131- let mut ident = None ;
120+ let ident;
132121
133122 match * message {
134- Frontend :: CancelRequest { code, process_id, secret_key } => {
135- try!( buf. write_u32 :: < BigEndian > ( code) ) ;
136- try!( buf. write_u32 :: < BigEndian > ( process_id) ) ;
137- try!( buf. write_u32 :: < BigEndian > ( secret_key) ) ;
138- }
139123 Frontend :: CopyData { data } => {
140124 ident = Some ( b'd' ) ;
141125 try!( buf. write_all ( data) ) ;
@@ -150,7 +134,6 @@ impl<W: Write> WriteMessage for W {
150134 try!( buf. write_cstr ( portal) ) ;
151135 try!( buf. write_i32 :: < BigEndian > ( max_rows) ) ;
152136 }
153- Frontend :: SslRequest { code } => try!( buf. write_u32 :: < BigEndian > ( code) ) ,
154137 Frontend :: Sync => ident = Some ( b'S' ) ,
155138 }
156139
0 commit comments