From 543af184ab299a9e99a8b97d945c01f75b975f86 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Thu, 29 Aug 2013 02:19:53 -0400 Subject: [PATCH] Moving blocks around for consistency --- src/lib.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 01e2de18..29d417db 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,19 +43,6 @@ fn handle_notice_response(fields: ~[(u8, ~str)]) { info!("%s: %s", err.severity, err.message); } -pub struct PostgresConnection { - priv stream: Cell, - priv next_stmt_id: Cell -} - -impl Drop for PostgresConnection { - fn drop(&self) { - do io_error::cond.trap(|_| {}).inside { - self.write_message(&Terminate); - } - } -} - #[deriving(ToStr)] pub enum PostgresConnectError { InvalidUrl, @@ -114,6 +101,19 @@ impl PostgresDbError { } } +pub struct PostgresConnection { + priv stream: Cell, + priv next_stmt_id: Cell +} + +impl Drop for PostgresConnection { + fn drop(&self) { + do io_error::cond.trap(|_| {}).inside { + self.write_message(&Terminate); + } + } +} + impl PostgresConnection { pub fn connect(url: &str) -> PostgresConnection { match PostgresConnection::try_connect(url) {