@@ -351,7 +351,7 @@ impl InnerConnection {
351351 Option :: None => { }
352352 }
353353
354- try!( conn. write_messages ( [ StartupMessage {
354+ try!( conn. write_messages ( & [ StartupMessage {
355355 version : message:: PROTOCOL_VERSION ,
356356 parameters : options[ ]
357357 } ] ) ) ;
@@ -410,7 +410,7 @@ impl InnerConnection {
410410 AuthenticationOk => return Ok ( ( ) ) ,
411411 AuthenticationCleartextPassword => {
412412 let pass = try!( user. password . ok_or ( ConnectError :: MissingPassword ) ) ;
413- try!( self . write_messages ( [ PasswordMessage {
413+ try!( self . write_messages ( & [ PasswordMessage {
414414 password : pass[ ] ,
415415 } ] ) ) ;
416416 }
@@ -422,9 +422,9 @@ impl InnerConnection {
422422 let output = hasher. finalize ( ) [ ] . to_hex ( ) ;
423423 let hasher = Hasher :: new ( MD5 ) ;
424424 hasher. update ( output. as_bytes ( ) ) ;
425- hasher. update ( salt) ;
425+ hasher. update ( & salt) ;
426426 let output = format ! ( "md5{}" , hasher. finalize( ) [ ] . to_hex( ) ) ;
427- try!( self . write_messages ( [ PasswordMessage {
427+ try!( self . write_messages ( & [ PasswordMessage {
428428 password : output[ ]
429429 } ] ) ) ;
430430 }
@@ -458,11 +458,11 @@ impl InnerConnection {
458458 let stmt_name = format ! ( "s{}" , self . next_stmt_id) ;
459459 self . next_stmt_id += 1 ;
460460
461- try!( self . write_messages ( [
461+ try!( self . write_messages ( & [
462462 Parse {
463463 name : stmt_name[ ] ,
464464 query : query,
465- param_types : [ ]
465+ param_types : & [ ]
466466 } ,
467467 Describe {
468468 variant : b'S' ,
@@ -548,7 +548,7 @@ impl InnerConnection {
548548 }
549549
550550 fn close_statement ( & mut self , stmt_name : & str ) -> Result < ( ) > {
551- try!( self . write_messages ( [
551+ try!( self . write_messages ( & [
552552 Close {
553553 variant : b'S' ,
554554 name : stmt_name,
@@ -605,7 +605,7 @@ impl InnerConnection {
605605
606606 fn quick_query ( & mut self , query : & str ) -> Result < Vec < Vec < Option < String > > > > {
607607 check_desync ! ( self ) ;
608- try!( self . write_messages ( [ Query { query : query } ] ) ) ;
608+ try!( self . write_messages ( & [ Query { query : query } ] ) ) ;
609609
610610 let mut result = vec ! [ ] ;
611611 loop {
@@ -617,7 +617,7 @@ impl InnerConnection {
617617 } ) . collect ( ) ) ;
618618 }
619619 CopyInResponse { .. } => {
620- try!( self . write_messages ( [
620+ try!( self . write_messages ( & [
621621 CopyFail {
622622 message : "COPY queries cannot be directly executed" ,
623623 } ,
@@ -636,7 +636,7 @@ impl InnerConnection {
636636 fn finish_inner ( & mut self ) -> Result < ( ) > {
637637 check_desync ! ( self ) ;
638638 self . canary = 0 ;
639- try!( self . write_messages ( [ Terminate ] ) ) ;
639+ try!( self . write_messages ( & [ Terminate ] ) ) ;
640640 Ok ( ( ) )
641641 }
642642}
@@ -1095,13 +1095,13 @@ impl<'conn> Statement<'conn> {
10951095 values. push ( try!( param. to_sql ( ty) ) ) ;
10961096 } ;
10971097
1098- try!( conn. write_messages ( [
1098+ try!( conn. write_messages ( & [
10991099 Bind {
11001100 portal : portal_name,
11011101 statement : self . name [ ] ,
1102- formats : [ 1 ] ,
1102+ formats : & [ 1 ] ,
11031103 values : values[ ] ,
1104- result_formats : [ 1 ]
1104+ result_formats : & [ 1 ]
11051105 } ,
11061106 Execute {
11071107 portal : portal_name,
@@ -1190,7 +1190,7 @@ impl<'conn> Statement<'conn> {
11901190 break ;
11911191 }
11921192 CopyInResponse { .. } => {
1193- try!( conn. write_messages ( [
1193+ try!( conn. write_messages ( & [
11941194 CopyFail {
11951195 message : "COPY queries cannot be directly executed" ,
11961196 } ,
@@ -1273,7 +1273,7 @@ impl<'stmt> Rows<'stmt> {
12731273 fn finish_inner ( & mut self ) -> Result < ( ) > {
12741274 let mut conn = self . stmt . conn . conn . borrow_mut ( ) ;
12751275 check_desync ! ( conn) ;
1276- try!( conn. write_messages ( [
1276+ try!( conn. write_messages ( & [
12771277 Close {
12781278 variant : b'P' ,
12791279 name : self . name [ ]
@@ -1312,7 +1312,7 @@ impl<'stmt> Rows<'stmt> {
13121312 return DbError :: new ( fields) ;
13131313 }
13141314 CopyInResponse { .. } => {
1315- try!( conn. write_messages ( [
1315+ try!( conn. write_messages ( & [
13161316 CopyFail {
13171317 message : "COPY queries cannot be directly executed" ,
13181318 } ,
@@ -1328,7 +1328,7 @@ impl<'stmt> Rows<'stmt> {
13281328 }
13291329
13301330 fn execute ( & mut self ) -> Result < ( ) > {
1331- try!( self . stmt . conn . write_messages ( [
1331+ try!( self . stmt . conn . write_messages ( & [
13321332 Execute {
13331333 portal : self . name [ ] ,
13341334 max_rows : self . row_limit
@@ -1520,13 +1520,13 @@ impl<'a> CopyInStatement<'a> {
15201520 where I : Iterator < J > , J : Iterator < & ' b ToSql + ' b > {
15211521 let mut conn = self . conn . conn . borrow_mut ( ) ;
15221522
1523- try!( conn. write_messages ( [
1523+ try!( conn. write_messages ( & [
15241524 Bind {
15251525 portal : "" ,
15261526 statement : self . name [ ] ,
1527- formats : [ ] ,
1528- values : [ ] ,
1529- result_formats : [ ]
1527+ formats : & [ ] ,
1528+ values : & [ ] ,
1529+ result_formats : & [ ]
15301530 } ,
15311531 Execute {
15321532 portal : "" ,
@@ -1605,7 +1605,7 @@ impl<'a> CopyInStatement<'a> {
16051605 }
16061606
16071607 let _ = buf. write_be_i16 ( -1 ) ;
1608- try!( conn. write_messages ( [
1608+ try!( conn. write_messages ( & [
16091609 CopyData {
16101610 data : buf. unwrap ( ) [ ] ,
16111611 } ,
0 commit comments