Skip to content

Commit e2260ca

Browse files
committed
Minor cleanup
1 parent 237ae8c commit e2260ca

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/postgres/lib.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -817,14 +817,6 @@ impl<'self> NormalPostgresStatement<'self> {
817817
}
818818
}
819819

820-
fn lazy_query<'a>(&'a self, row_limit: uint, params: &[&ToSql])
821-
-> PostgresResult<'a> {
822-
match self.try_lazy_query(row_limit, params) {
823-
Ok(result) => result,
824-
Err(err) => fail2!("Error executing query:\n{}", err.to_str())
825-
}
826-
}
827-
828820
fn try_lazy_query<'a>(&'a self, row_limit: uint, params: &[&ToSql])
829821
-> Result<PostgresResult<'a>, PostgresDbError> {
830822
let id = self.next_portal_id.take();
@@ -979,7 +971,10 @@ impl<'self> TransactionalPostgresStatement<'self> {
979971
/// Fails if there was an error executing the statement.
980972
pub fn lazy_query<'a>(&'a self, row_limit: uint, params: &[&ToSql])
981973
-> PostgresResult<'a> {
982-
(**self).lazy_query(row_limit, params)
974+
match self.try_lazy_query(row_limit, params) {
975+
Ok(result) => result,
976+
Err(err) => fail2!("Error executing query:\n{}", err.to_str())
977+
}
983978
}
984979
}
985980

0 commit comments

Comments
 (0)