From 746850d647ff36e6a9a435138bd56312978a342d Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Sun, 8 Dec 2013 21:56:43 -0800 Subject: [PATCH] Minor cleanup --- lib.rs | 4 +--- pool.rs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib.rs b/lib.rs index f029d98a..77af9540 100644 --- a/lib.rs +++ b/lib.rs @@ -1010,9 +1010,7 @@ impl<'conn> PostgresStatement for NormalPostgresStatement<'conn> { fn try_update(&self, params: &[&ToSql]) -> Result { match self.execute("", 0, params) { - Some(err) => { - return Err(err); - } + Some(err) => return Err(err), None => {} } diff --git a/pool.rs b/pool.rs index 8dc147bc..80184bad 100644 --- a/pool.rs +++ b/pool.rs @@ -52,7 +52,7 @@ impl PostgresConnectionPool { pool: ~[], }; - while pool.pool.len() < pool_size { + for _ in range(0, pool_size) { match pool.new_connection() { None => (), Some(err) => return Err(err)