Skip to content

Commit ab59eac

Browse files
committed
Derive things for errors
1 parent c308ced commit ab59eac

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ path = "tests/test.rs"
1717
[dependencies.openssl]
1818

1919
git = "https://github.com/sfackler/rust-openssl"
20-
rev = "8696b091402f67a655c3b924c118392cb67540a3"
20+
rev = "39343df472b4b0c99055d371f42beceeef527bd6"
2121

2222
[dependencies.phf]
2323

src/error.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,7 @@ make_errors!(
357357
)
358358

359359
/// Reasons a new Postgres connection could fail
360+
#[deriving(Clone, PartialEq, Eq)]
360361
pub enum PostgresConnectError {
361362
/// The provided URL could not be parsed
362363
InvalidUrl(String),
@@ -408,6 +409,7 @@ impl fmt::Show for PostgresConnectError {
408409
}
409410

410411
/// Represents the position of an error in a query
412+
#[deriving(Clone, PartialEq, Eq)]
411413
pub enum PostgresErrorPosition {
412414
/// A position in the original query
413415
Position(uint),
@@ -421,6 +423,7 @@ pub enum PostgresErrorPosition {
421423
}
422424

423425
/// Encapsulates a Postgres error or notice.
426+
#[deriving(Clone, PartialEq, Eq)]
424427
pub struct PostgresDbError {
425428
/// The field contents are ERROR, FATAL, or PANIC (in an error message),
426429
/// or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a
@@ -515,6 +518,7 @@ impl fmt::Show for PostgresDbError {
515518
}
516519

517520
/// An error encountered when communicating with the Postgres server
521+
#[deriving(Clone, PartialEq, Eq)]
518522
pub enum PostgresError {
519523
/// An error reported by the Postgres server
520524
PgDbError(PostgresDbError),

0 commit comments

Comments
 (0)