@@ -417,7 +417,7 @@ impl InnerPostgresConnection {
417
417
try!( conn. handle_auth ( user) ) ;
418
418
419
419
loop {
420
- match try_pg_conn ! ( conn. read_message ( ) ) {
420
+ match try_pg_conn ! ( conn. read_message_ ( ) ) {
421
421
BackendKeyData { process_id, secret_key } => {
422
422
conn. cancel_data . process_id = process_id;
423
423
conn. cancel_data . secret_key = secret_key;
@@ -440,7 +440,7 @@ impl InnerPostgresConnection {
440
440
Ok ( try_desync ! ( self , self . stream. flush( ) ) )
441
441
}
442
442
443
- fn read_message ( & mut self ) -> IoResult < BackendMessage > {
443
+ fn read_message_ ( & mut self ) -> IoResult < BackendMessage > {
444
444
debug_assert ! ( !self . desynchronized) ;
445
445
loop {
446
446
match try_desync ! ( self , self . stream. read_message( ) ) {
@@ -463,7 +463,7 @@ impl InnerPostgresConnection {
463
463
}
464
464
465
465
fn handle_auth ( & mut self , user : PostgresUserInfo ) -> Result < ( ) , PostgresConnectError > {
466
- match try_pg_conn ! ( self . read_message ( ) ) {
466
+ match try_pg_conn ! ( self . read_message_ ( ) ) {
467
467
AuthenticationOk => return Ok ( ( ) ) ,
468
468
AuthenticationCleartextPassword => {
469
469
let pass = match user. password {
@@ -503,7 +503,7 @@ impl InnerPostgresConnection {
503
503
}
504
504
}
505
505
506
- match try_pg_conn ! ( self . read_message ( ) ) {
506
+ match try_pg_conn ! ( self . read_message_ ( ) ) {
507
507
AuthenticationOk => Ok ( ( ) ) ,
508
508
ErrorResponse { fields } => Err ( PgConnectDbError ( PostgresDbError :: new ( fields) ) ) ,
509
509
_ => {
@@ -535,7 +535,7 @@ impl InnerPostgresConnection {
535
535
} ,
536
536
Sync ] ) ) ;
537
537
538
- match try_pg ! ( self . read_message ( ) ) {
538
+ match try_pg ! ( self . read_message_ ( ) ) {
539
539
ParseComplete => { }
540
540
ErrorResponse { fields } => {
541
541
try!( self . wait_for_ready ( ) ) ;
@@ -544,14 +544,14 @@ impl InnerPostgresConnection {
544
544
_ => bad_response ! ( self ) ,
545
545
}
546
546
547
- let mut param_types: Vec < PostgresType > = match try_pg ! ( self . read_message ( ) ) {
547
+ let mut param_types: Vec < PostgresType > = match try_pg ! ( self . read_message_ ( ) ) {
548
548
ParameterDescription { types } => {
549
549
types. iter ( ) . map ( |ty| PostgresType :: from_oid ( * ty) ) . collect ( )
550
550
}
551
551
_ => bad_response ! ( self ) ,
552
552
} ;
553
553
554
- let mut result_desc: Vec < ResultDescription > = match try_pg ! ( self . read_message ( ) ) {
554
+ let mut result_desc: Vec < ResultDescription > = match try_pg ! ( self . read_message_ ( ) ) {
555
555
RowDescription { descriptions } => {
556
556
descriptions. into_iter ( ) . map ( |RowDescriptionEntry { name, type_oid, .. } | {
557
557
ResultDescription {
@@ -613,7 +613,7 @@ impl InnerPostgresConnection {
613
613
}
614
614
615
615
fn wait_for_ready ( & mut self ) -> PostgresResult < ( ) > {
616
- match try_pg ! ( self . read_message ( ) ) {
616
+ match try_pg ! ( self . read_message_ ( ) ) {
617
617
ReadyForQuery { .. } => Ok ( ( ) ) ,
618
618
_ => bad_response ! ( self )
619
619
}
@@ -625,7 +625,7 @@ impl InnerPostgresConnection {
625
625
626
626
let mut result = vec ! [ ] ;
627
627
loop {
628
- match try_pg ! ( self . read_message ( ) ) {
628
+ match try_pg ! ( self . read_message_ ( ) ) {
629
629
ReadyForQuery { .. } => break ,
630
630
DataRow { row } => {
631
631
result. push ( row. into_iter ( ) . map ( |opt| {
@@ -887,8 +887,8 @@ impl PostgresConnection {
887
887
self . conn . borrow_mut ( ) . wait_for_ready ( )
888
888
}
889
889
890
- fn read_message ( & self ) -> IoResult < BackendMessage > {
891
- self . conn . borrow_mut ( ) . read_message ( )
890
+ fn read_message_ ( & self ) -> IoResult < BackendMessage > {
891
+ self . conn . borrow_mut ( ) . read_message_ ( )
892
892
}
893
893
894
894
fn write_messages ( & self , messages : & [ FrontendMessage ] ) -> IoResult < ( ) > {
@@ -1063,7 +1063,7 @@ impl<'conn> PostgresStatement<'conn> {
1063
1063
} ,
1064
1064
Sync ] ) ) ;
1065
1065
loop {
1066
- match try_pg ! ( self . conn. read_message ( ) ) {
1066
+ match try_pg ! ( self . conn. read_message_ ( ) ) {
1067
1067
ReadyForQuery { .. } => break ,
1068
1068
ErrorResponse { fields } => {
1069
1069
try!( self . conn . wait_for_ready ( ) ) ;
@@ -1108,7 +1108,7 @@ impl<'conn> PostgresStatement<'conn> {
1108
1108
} ,
1109
1109
Sync ] ) ) ;
1110
1110
1111
- match try_pg ! ( conn. read_message ( ) ) {
1111
+ match try_pg ! ( conn. read_message_ ( ) ) {
1112
1112
BindComplete => Ok ( ( ) ) ,
1113
1113
ErrorResponse { fields } => {
1114
1114
try!( self . conn . wait_for_ready ( ) ) ;
@@ -1175,7 +1175,7 @@ impl<'conn> PostgresStatement<'conn> {
1175
1175
let mut conn = self . conn . conn . borrow_mut ( ) ;
1176
1176
let num;
1177
1177
loop {
1178
- match try_pg ! ( conn. read_message ( ) ) {
1178
+ match try_pg ! ( conn. read_message_ ( ) ) {
1179
1179
DataRow { .. } => { }
1180
1180
ErrorResponse { fields } => {
1181
1181
try!( conn. wait_for_ready ( ) ) ;
@@ -1275,7 +1275,7 @@ impl<'stmt> PostgresRows<'stmt> {
1275
1275
Sync ] ) ) ;
1276
1276
1277
1277
loop {
1278
- match try_pg ! ( conn. read_message ( ) ) {
1278
+ match try_pg ! ( conn. read_message_ ( ) ) {
1279
1279
ReadyForQuery { .. } => break ,
1280
1280
ErrorResponse { fields } => {
1281
1281
try!( conn. wait_for_ready ( ) ) ;
@@ -1291,7 +1291,7 @@ impl<'stmt> PostgresRows<'stmt> {
1291
1291
fn read_rows ( & mut self ) -> PostgresResult < ( ) > {
1292
1292
let mut conn = self . stmt . conn . conn . borrow_mut ( ) ;
1293
1293
loop {
1294
- match try_pg ! ( conn. read_message ( ) ) {
1294
+ match try_pg ! ( conn. read_message_ ( ) ) {
1295
1295
EmptyQueryResponse | CommandComplete { .. } => {
1296
1296
self . more_rows = false ;
1297
1297
break ;
0 commit comments