Update for ToStr removal
This commit is contained in:
parent
9b81b556a1
commit
0d78856938
10
src/error.rs
10
src/error.rs
@ -9,7 +9,7 @@ use phf::PhfMap;
|
|||||||
macro_rules! make_errors(
|
macro_rules! make_errors(
|
||||||
($($code:expr => $error:ident),+) => (
|
($($code:expr => $error:ident),+) => (
|
||||||
/// SQLSTATE error codes
|
/// SQLSTATE error codes
|
||||||
#[deriving(ToStr, Eq, Clone, Show)]
|
#[deriving(Eq, Clone, Show)]
|
||||||
#[allow(missing_doc)]
|
#[allow(missing_doc)]
|
||||||
pub enum PostgresSqlState {
|
pub enum PostgresSqlState {
|
||||||
$($error,)+
|
$($error,)+
|
||||||
@ -352,7 +352,7 @@ make_errors!(
|
|||||||
)
|
)
|
||||||
|
|
||||||
/// Reasons a new Postgres connection could fail
|
/// Reasons a new Postgres connection could fail
|
||||||
#[deriving(ToStr)]
|
#[deriving(Show)]
|
||||||
pub enum PostgresConnectError {
|
pub enum PostgresConnectError {
|
||||||
/// The provided URL could not be parsed
|
/// The provided URL could not be parsed
|
||||||
InvalidUrl,
|
InvalidUrl,
|
||||||
@ -378,7 +378,7 @@ pub enum PostgresConnectError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Represents the position of an error in a query
|
/// Represents the position of an error in a query
|
||||||
#[deriving(ToStr, Show)]
|
#[deriving(Show)]
|
||||||
pub enum PostgresErrorPosition {
|
pub enum PostgresErrorPosition {
|
||||||
/// A position in the original query
|
/// A position in the original query
|
||||||
Position(uint),
|
Position(uint),
|
||||||
@ -392,7 +392,7 @@ pub enum PostgresErrorPosition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Encapsulates a Postgres error or notice.
|
/// Encapsulates a Postgres error or notice.
|
||||||
#[deriving(ToStr, Show)]
|
#[deriving(Show)]
|
||||||
pub struct PostgresDbError {
|
pub struct PostgresDbError {
|
||||||
/// The field contents are ERROR, FATAL, or PANIC (in an error message),
|
/// The field contents are ERROR, FATAL, or PANIC (in an error message),
|
||||||
/// or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a
|
/// or WARNING, NOTICE, DEBUG, INFO, or LOG (in a notice message), or a
|
||||||
@ -496,7 +496,7 @@ impl PostgresDbError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// An error encountered when communicating with the Postgres server
|
/// An error encountered when communicating with the Postgres server
|
||||||
#[deriving(ToStr, Show)]
|
#[deriving(Show)]
|
||||||
pub enum PostgresError {
|
pub enum PostgresError {
|
||||||
/// An error reported by the Postgres server
|
/// An error reported by the Postgres server
|
||||||
PgDbError(PostgresDbError),
|
PgDbError(PostgresDbError),
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 13e7cdbc4e95d6081e5839c6f4206eb44e37c56c
|
Subproject commit c3cf00ea10efdc922dd7215575fd390c2bfe54c6
|
Loading…
Reference in New Issue
Block a user