@@ -48,10 +48,10 @@ impl DbErrorNew for DbError {
4848 None => match map. remove ( & b'p' ) {
4949 Some ( pos) => Some ( ErrorPosition :: Internal {
5050 position : try!( pos. parse ( ) . map_err ( |_| ( ) ) ) ,
51- query : try!( map. remove ( & b'q' ) . ok_or ( ( ) ) )
51+ query : try!( map. remove ( & b'q' ) . ok_or ( ( ) ) ) ,
5252 } ) ,
53- None => None
54- }
53+ None => None ,
54+ } ,
5555 } ,
5656 where_ : map. remove ( & b'W' ) ,
5757 schema : map. remove ( & b's' ) ,
@@ -194,7 +194,7 @@ impl error::Error for DbError {
194194#[ derive( Debug ) ]
195195pub enum ConnectError {
196196 /// An error creating `ConnectParams`.
197- BadConnectParams ( Box < error:: Error + Sync + Send > ) ,
197+ BadConnectParams ( Box < error:: Error + Sync + Send > ) ,
198198 /// The `ConnectParams` was missing a user.
199199 MissingUser ,
200200 /// An error from the Postgres server itself.
@@ -207,7 +207,7 @@ pub enum ConnectError {
207207 /// The Postgres server does not support SSL encryption.
208208 NoSslSupport ,
209209 /// An error initializing the SSL session.
210- SslError ( Box < error:: Error + Sync + Send > ) ,
210+ SslError ( Box < error:: Error + Sync + Send > ) ,
211211 /// An error communicating with the server.
212212 IoError ( io:: Error ) ,
213213}
@@ -220,7 +220,7 @@ impl fmt::Display for ConnectError {
220220 ConnectError :: DbError ( ref err) => write ! ( fmt, ": {}" , err) ,
221221 ConnectError :: SslError ( ref err) => write ! ( fmt, ": {}" , err) ,
222222 ConnectError :: IoError ( ref err) => write ! ( fmt, ": {}" , err) ,
223- _ => Ok ( ( ) )
223+ _ => Ok ( ( ) ) ,
224224 }
225225 }
226226}
@@ -231,7 +231,8 @@ impl error::Error for ConnectError {
231231 ConnectError :: BadConnectParams ( _) => "Error creating `ConnectParams`" ,
232232 ConnectError :: MissingUser => "User missing in `ConnectParams`" ,
233233 ConnectError :: DbError ( _) => "Error reported by Postgres" ,
234- ConnectError :: MissingPassword => "The server requested a password but none was provided" ,
234+ ConnectError :: MissingPassword =>
235+ "The server requested a password but none was provided" ,
235236 ConnectError :: UnsupportedAuthentication => {
236237 "The server requested an unsupported authentication method"
237238 }
@@ -247,7 +248,7 @@ impl error::Error for ConnectError {
247248 ConnectError :: DbError ( ref err) => Some ( & * * err) ,
248249 ConnectError :: SslError ( ref err) => Some ( & * * err) ,
249250 ConnectError :: IoError ( ref err) => Some ( err) ,
250- _ => None
251+ _ => None ,
251252 }
252253 }
253254}
@@ -280,8 +281,8 @@ pub enum ErrorPosition {
280281 /// The byte position.
281282 position : u32 ,
282283 /// A query generated by the Postgres server.
283- query : String
284- }
284+ query : String ,
285+ } ,
285286}
286287
287288/// An error encountered when communicating with the Postgres server.
@@ -297,7 +298,7 @@ pub enum Error {
297298 /// An attempt was made to read from a column that does not exist.
298299 InvalidColumn ,
299300 /// An error converting between Postgres and Rust types.
300- Conversion ( Box < error:: Error + Sync + Send > ) ,
301+ Conversion ( Box < error:: Error + Sync + Send > ) ,
301302}
302303
303304impl fmt:: Display for Error {
@@ -329,7 +330,7 @@ impl error::Error for Error {
329330 Error :: DbError ( ref err) => Some ( & * * err) ,
330331 Error :: IoError ( ref err) => Some ( err) ,
331332 Error :: Conversion ( ref err) => Some ( & * * err) ,
332- _ => None
333+ _ => None ,
333334 }
334335 }
335336}
0 commit comments