From e2260ca15b0003b518ee2e81f71c010594a4919d Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 30 Sep 2013 08:35:03 -0700 Subject: [PATCH] Minor cleanup --- src/postgres/lib.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/postgres/lib.rs b/src/postgres/lib.rs index 704742f9..e626c180 100644 --- a/src/postgres/lib.rs +++ b/src/postgres/lib.rs @@ -817,14 +817,6 @@ impl<'self> NormalPostgresStatement<'self> { } } - fn lazy_query<'a>(&'a self, row_limit: uint, params: &[&ToSql]) - -> PostgresResult<'a> { - match self.try_lazy_query(row_limit, params) { - Ok(result) => result, - Err(err) => fail2!("Error executing query:\n{}", err.to_str()) - } - } - fn try_lazy_query<'a>(&'a self, row_limit: uint, params: &[&ToSql]) -> Result, PostgresDbError> { let id = self.next_portal_id.take(); @@ -979,7 +971,10 @@ impl<'self> TransactionalPostgresStatement<'self> { /// Fails if there was an error executing the statement. pub fn lazy_query<'a>(&'a self, row_limit: uint, params: &[&ToSql]) -> PostgresResult<'a> { - (**self).lazy_query(row_limit, params) + match self.try_lazy_query(row_limit, params) { + Ok(result) => result, + Err(err) => fail2!("Error executing query:\n{}", err.to_str()) + } } }