1- //! Postgres errors
2-
31use std:: collections:: HashMap ;
42use std:: error;
5- use std:: io;
3+ use std:: io:: IoError ;
64use std:: fmt;
75use std:: result;
86
9- use openssl:: ssl:: error as sslerror ;
7+ use openssl:: ssl:: error:: SslError ;
108use phf;
119
1210use Result ;
@@ -365,7 +363,7 @@ pub enum ConnectError {
365363 /// The URL was missing a user
366364 MissingUser ,
367365 /// An error from the Postgres server itself
368- DbError ( :: error :: DbError ) ,
366+ DbError ( DbError ) ,
369367 /// A password was required but not provided in the URL
370368 MissingPassword ,
371369 /// The Postgres server requested an authentication method not supported
@@ -374,9 +372,9 @@ pub enum ConnectError {
374372 /// The Postgres server does not support SSL encryption
375373 NoSslSupport ,
376374 /// There was an error initializing the SSL session
377- SslError ( sslerror :: SslError ) ,
375+ SslError ( SslError ) ,
378376 /// There was an error communicating with the server
379- IoError ( io :: IoError ) ,
377+ IoError ( IoError ) ,
380378 /// The server sent an unexpected response
381379 BadResponse ,
382380}
@@ -415,8 +413,8 @@ impl error::Error for ConnectError {
415413 }
416414}
417415
418- impl error:: FromError < io :: IoError > for ConnectError {
419- fn from_error ( err : io :: IoError ) -> ConnectError {
416+ impl error:: FromError < IoError > for ConnectError {
417+ fn from_error ( err : IoError ) -> ConnectError {
420418 ConnectError :: IoError ( err)
421419 }
422420}
@@ -427,8 +425,8 @@ impl error::FromError<DbError> for ConnectError {
427425 }
428426}
429427
430- impl error:: FromError < sslerror :: SslError > for ConnectError {
431- fn from_error ( err : sslerror :: SslError ) -> ConnectError {
428+ impl error:: FromError < SslError > for ConnectError {
429+ fn from_error ( err : SslError ) -> ConnectError {
432430 ConnectError :: SslError ( err)
433431 }
434432}
@@ -596,7 +594,7 @@ pub enum Error {
596594 /// An error reported by the Postgres server
597595 DbError ( :: error:: DbError ) ,
598596 /// An error communicating with the Postgres server
599- IoError ( io :: IoError ) ,
597+ IoError ( IoError ) ,
600598 /// The communication channel with the Postgres server has desynchronized
601599 /// due to an earlier communications error.
602600 StreamDesynchronized ,
@@ -699,8 +697,8 @@ impl error::FromError<DbError> for Error {
699697 }
700698}
701699
702- impl error:: FromError < io :: IoError > for Error {
703- fn from_error ( err : io :: IoError ) -> Error {
700+ impl error:: FromError < IoError > for Error {
701+ fn from_error ( err : IoError ) -> Error {
704702 Error :: IoError ( err)
705703 }
706704}
0 commit comments