File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1479,23 +1479,23 @@ impl<'conn> Statement<'conn> {
14791479 self . next_portal_id . set ( id + 1 ) ;
14801480 let portal_name = format ! ( "{}p{}" , self . name, id) ;
14811481
1482- match self . inner_query ( & * portal_name, row_limit, params) {
1483- Ok ( ( result, more_rows) ) => {
1484- Ok ( LazyRows {
1485- _trans : trans,
1486- result : result,
1487- name : portal_name,
1488- row_limit : row_limit,
1489- more_rows : more_rows,
1490- finished : false ,
1491- } )
1482+ self . inner_query ( & * portal_name, row_limit, params) . map ( move |( result, more_rows) | {
1483+ LazyRows {
1484+ _trans : trans,
1485+ result : result,
1486+ name : portal_name,
1487+ row_limit : row_limit,
1488+ more_rows : more_rows,
1489+ finished : false ,
14921490 }
1493- Err ( err) => Err ( err) ,
1494- }
1491+ } )
14951492 }
14961493
14971494 /// Consumes the statement, clearing it from the Postgres session.
14981495 ///
1496+ /// If this statement was created via the `prepare_cached` method, `finish`
1497+ /// does nothing.
1498+ ///
14991499 /// Functionally identical to the `Drop` implementation of the
15001500 /// `Statement` except that it returns any error to the caller.
15011501 pub fn finish ( mut self ) -> Result < ( ) > {
You can’t perform that action at this time.
0 commit comments