Skip to content

Commit 4c90977

Browse files
committed
Little cleanup
1 parent d3c75d5 commit 4c90977

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/lib.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff 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<()> {

0 commit comments

Comments
 (0)