@@ -521,13 +521,13 @@ impl InnerConnection {
521521 -> Result < ( Vec < Type > , Vec < ResultDescription > ) > {
522522 try!( self . write_messages ( & [
523523 Parse {
524- name : & * stmt_name,
524+ name : stmt_name,
525525 query : query,
526526 param_types : & [ ]
527527 } ,
528528 Describe {
529529 variant : b'S' ,
530- name : & * stmt_name,
530+ name : stmt_name,
531531 } ,
532532 Sync ] ) ) ;
533533
@@ -542,7 +542,7 @@ impl InnerConnection {
542542
543543 let mut param_types: Vec < _ > = match try!( self . read_message ( ) ) {
544544 ParameterDescription { types } => {
545- types. iter ( ) . map ( |ty| Type :: from_oid ( * ty ) ) . collect ( )
545+ types. into_iter ( ) . map ( Type :: from_oid) . collect ( )
546546 }
547547 _ => bad_response ! ( self ) ,
548548 } ;
@@ -1033,8 +1033,7 @@ impl<'conn> Transaction<'conn> {
10331033 }
10341034
10351035 /// Like `Connection::prepare_copy_in`.
1036- pub fn prepare_copy_in ( & self , table : & str , cols : & [ & str ] )
1037- -> Result < CopyInStatement < ' conn > > {
1036+ pub fn prepare_copy_in ( & self , table : & str , cols : & [ & str ] ) -> Result < CopyInStatement < ' conn > > {
10381037 self . conn . conn . borrow_mut ( ) . prepare_copy_in ( table, cols, self . conn )
10391038 }
10401039
@@ -1117,8 +1116,8 @@ impl<'conn> Transaction<'conn> {
11171116
11181117 /// Consumes the transaction, commiting or rolling it back as appropriate.
11191118 ///
1120- /// Functionally equivalent to the `Drop` implementation of
1121- /// `Transaction` except that it returns any error to the caller.
1119+ /// Functionally equivalent to the `Drop` implementation of `Transaction`
1120+ /// except that it returns any error to the caller.
11221121 pub fn finish ( mut self ) -> Result < ( ) > {
11231122 self . finished = true ;
11241123 self . finish_inner ( )
@@ -1237,6 +1236,7 @@ impl<'conn> Statement<'conn> {
12371236 /// Ok(count) => println!("{} row(s) updated", count),
12381237 /// Err(err) => println!("Error executing query: {}", err)
12391238 /// }
1239+ /// ```
12401240 pub fn execute ( & self , params : & [ & ToSql ] ) -> Result < uint > {
12411241 check_desync ! ( self . conn) ;
12421242 try!( self . inner_execute ( "" , 0 , params) ) ;
@@ -1352,11 +1352,11 @@ impl<'stmt> Rows<'stmt> {
13521352 EmptyQueryResponse | CommandComplete { .. } => {
13531353 self . more_rows = false ;
13541354 break ;
1355- } ,
1355+ }
13561356 PortalSuspended => {
13571357 self . more_rows = true ;
13581358 break ;
1359- } ,
1359+ }
13601360 DataRow { row } => self . data . push_back ( row) ,
13611361 ErrorResponse { fields } => {
13621362 try!( conn. wait_for_ready ( ) ) ;
@@ -1440,7 +1440,6 @@ pub struct Row<'stmt> {
14401440
14411441impl < ' stmt > Row < ' stmt > {
14421442 /// Returns the number of values in the row
1443- #[ inline]
14441443 pub fn len ( & self ) -> uint {
14451444 self . data . len ( )
14461445 }
@@ -1524,19 +1523,16 @@ pub struct LazyRows<'trans, 'stmt> {
15241523
15251524impl < ' trans , ' stmt > LazyRows < ' trans , ' stmt > {
15261525 /// Like `Rows::finish`.
1527- #[ inline]
15281526 pub fn finish ( self ) -> Result < ( ) > {
15291527 self . result . finish ( )
15301528 }
15311529}
15321530
15331531impl < ' trans , ' stmt > Iterator < Result < Row < ' stmt > > > for LazyRows < ' trans , ' stmt > {
1534- #[ inline]
15351532 fn next ( & mut self ) -> Option < Result < Row < ' stmt > > > {
15361533 self . result . try_next ( )
15371534 }
15381535
1539- #[ inline]
15401536 fn size_hint ( & self ) -> ( uint , Option < uint > ) {
15411537 self . result . size_hint ( )
15421538 }
0 commit comments