Skip to content

Commit 25cd85e

Browse files
committed
Minor cleanup
1 parent 236ad87 commit 25cd85e

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

src/postgres/lib.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -583,24 +583,6 @@ pub struct NormalPostgresStatement<'self> {
583583
priv next_portal_id: Cell<uint>
584584
}
585585

586-
#[deriving(Eq)]
587-
pub struct ResultDescription {
588-
name: ~str,
589-
ty: PostgresType
590-
}
591-
592-
impl ResultDescription {
593-
fn from_row_description_entry(row: RowDescriptionEntry)
594-
-> ResultDescription {
595-
let RowDescriptionEntry { name, type_oid, _ } = row;
596-
597-
ResultDescription {
598-
name: name,
599-
ty: PostgresType::from_oid(type_oid)
600-
}
601-
}
602-
}
603-
604586
#[unsafe_destructor]
605587
impl<'self> Drop for NormalPostgresStatement<'self> {
606588
fn drop(&mut self) {
@@ -768,6 +750,24 @@ impl<'self> PostgresStatement for NormalPostgresStatement<'self> {
768750
}
769751
}
770752

753+
#[deriving(Eq)]
754+
pub struct ResultDescription {
755+
name: ~str,
756+
ty: PostgresType
757+
}
758+
759+
impl ResultDescription {
760+
fn from_row_description_entry(row: RowDescriptionEntry)
761+
-> ResultDescription {
762+
let RowDescriptionEntry { name, type_oid, _ } = row;
763+
764+
ResultDescription {
765+
name: name,
766+
ty: PostgresType::from_oid(type_oid)
767+
}
768+
}
769+
}
770+
771771
pub struct TransactionalPostgresStatement<'self> {
772772
priv stmt: NormalPostgresStatement<'self>
773773
}

src/postgres/test.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ fn test_too_few_params() {
353353
fn test_too_many_params() {
354354
let conn = PostgresConnection::connect("postgres://postgres@localhost");
355355
conn.try_update("SELECT $1::INT, $2::INT", [&1i32 as &ToSql,
356-
&2i32 as &ToSql,
357-
&3i32 as &ToSql]);
356+
&2i32 as &ToSql,
357+
&3i32 as &ToSql]);
358358
}
359359

360360
#[test]

0 commit comments

Comments
 (0)