@@ -757,7 +757,7 @@ impl InnerPostgresConnection {
757757 param_types : param_types,
758758 result_desc : result_desc,
759759 next_portal_id : Cell :: new ( 0 ) ,
760- finished : Cell :: new ( false ) ,
760+ finished : false ,
761761 } )
762762 }
763763
@@ -827,7 +827,8 @@ impl InnerPostgresConnection {
827827 fn finish_inner ( & mut self ) -> PostgresResult < ( ) > {
828828 check_desync ! ( self ) ;
829829 self . canary = 0 ;
830- Ok ( try_pg ! ( self . write_messages( [ Terminate ] ) ) )
830+ try_pg ! ( self . write_messages( [ Terminate ] ) ) ;
831+ Ok ( ( ) )
831832 }
832833}
833834
@@ -1151,7 +1152,7 @@ impl<'conn> PostgresTransaction<'conn> {
11511152 row_limit : uint )
11521153 -> PostgresResult < PostgresLazyRows
11531154 < ' trans , ' stmt > > {
1154- if self . conn as * PostgresConnection != stmt. conn as * PostgresConnection {
1155+ if self . conn as * _ != stmt. conn as * _ {
11551156 return Err ( PgWrongConnection ) ;
11561157 }
11571158 check_desync ! ( self . conn) ;
@@ -1171,13 +1172,13 @@ pub struct PostgresStatement<'conn> {
11711172 param_types : Vec < PostgresType > ,
11721173 result_desc : Vec < ResultDescription > ,
11731174 next_portal_id : Cell < uint > ,
1174- finished : Cell < bool > ,
1175+ finished : bool ,
11751176}
11761177
11771178#[ unsafe_destructor]
11781179impl < ' conn > Drop for PostgresStatement < ' conn > {
11791180 fn drop ( & mut self ) {
1180- if !self . finished . get ( ) {
1181+ if !self . finished {
11811182 let _ = self . finish_inner ( ) ;
11821183 }
11831184 }
@@ -1360,7 +1361,7 @@ impl<'conn> PostgresStatement<'conn> {
13601361 /// Functionally identical to the `Drop` implementation of the
13611362 /// `PostgresStatement` except that it returns any error to the caller.
13621363 pub fn finish ( mut self ) -> PostgresResult < ( ) > {
1363- self . finished . set ( true ) ;
1364+ self . finished = true ;
13641365 self . finish_inner ( )
13651366 }
13661367}
0 commit comments