@@ -48,10 +48,10 @@ impl DbErrorNew for DbError {
48
48
None => match map. remove ( & b'p' ) {
49
49
Some ( pos) => Some ( ErrorPosition :: Internal {
50
50
position : try!( pos. parse ( ) . map_err ( |_| ( ) ) ) ,
51
- query : try!( map. remove ( & b'q' ) . ok_or ( ( ) ) )
51
+ query : try!( map. remove ( & b'q' ) . ok_or ( ( ) ) ) ,
52
52
} ) ,
53
- None => None
54
- }
53
+ None => None ,
54
+ } ,
55
55
} ,
56
56
where_ : map. remove ( & b'W' ) ,
57
57
schema : map. remove ( & b's' ) ,
@@ -194,7 +194,7 @@ impl error::Error for DbError {
194
194
#[ derive( Debug ) ]
195
195
pub enum ConnectError {
196
196
/// An error creating `ConnectParams`.
197
- BadConnectParams ( Box < error:: Error + Sync + Send > ) ,
197
+ BadConnectParams ( Box < error:: Error + Sync + Send > ) ,
198
198
/// The `ConnectParams` was missing a user.
199
199
MissingUser ,
200
200
/// An error from the Postgres server itself.
@@ -207,7 +207,7 @@ pub enum ConnectError {
207
207
/// The Postgres server does not support SSL encryption.
208
208
NoSslSupport ,
209
209
/// An error initializing the SSL session.
210
- SslError ( Box < error:: Error + Sync + Send > ) ,
210
+ SslError ( Box < error:: Error + Sync + Send > ) ,
211
211
/// An error communicating with the server.
212
212
IoError ( io:: Error ) ,
213
213
}
@@ -220,7 +220,7 @@ impl fmt::Display for ConnectError {
220
220
ConnectError :: DbError ( ref err) => write ! ( fmt, ": {}" , err) ,
221
221
ConnectError :: SslError ( ref err) => write ! ( fmt, ": {}" , err) ,
222
222
ConnectError :: IoError ( ref err) => write ! ( fmt, ": {}" , err) ,
223
- _ => Ok ( ( ) )
223
+ _ => Ok ( ( ) ) ,
224
224
}
225
225
}
226
226
}
@@ -231,7 +231,8 @@ impl error::Error for ConnectError {
231
231
ConnectError :: BadConnectParams ( _) => "Error creating `ConnectParams`" ,
232
232
ConnectError :: MissingUser => "User missing in `ConnectParams`" ,
233
233
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" ,
235
236
ConnectError :: UnsupportedAuthentication => {
236
237
"The server requested an unsupported authentication method"
237
238
}
@@ -247,7 +248,7 @@ impl error::Error for ConnectError {
247
248
ConnectError :: DbError ( ref err) => Some ( & * * err) ,
248
249
ConnectError :: SslError ( ref err) => Some ( & * * err) ,
249
250
ConnectError :: IoError ( ref err) => Some ( err) ,
250
- _ => None
251
+ _ => None ,
251
252
}
252
253
}
253
254
}
@@ -280,8 +281,8 @@ pub enum ErrorPosition {
280
281
/// The byte position.
281
282
position : u32 ,
282
283
/// A query generated by the Postgres server.
283
- query : String
284
- }
284
+ query : String ,
285
+ } ,
285
286
}
286
287
287
288
/// An error encountered when communicating with the Postgres server.
@@ -297,7 +298,7 @@ pub enum Error {
297
298
/// An attempt was made to read from a column that does not exist.
298
299
InvalidColumn ,
299
300
/// An error converting between Postgres and Rust types.
300
- Conversion ( Box < error:: Error + Sync + Send > ) ,
301
+ Conversion ( Box < error:: Error + Sync + Send > ) ,
301
302
}
302
303
303
304
impl fmt:: Display for Error {
@@ -329,7 +330,7 @@ impl error::Error for Error {
329
330
Error :: DbError ( ref err) => Some ( & * * err) ,
330
331
Error :: IoError ( ref err) => Some ( err) ,
331
332
Error :: Conversion ( ref err) => Some ( & * * err) ,
332
- _ => None
333
+ _ => None ,
333
334
}
334
335
}
335
336
}
0 commit comments