@@ -382,23 +382,23 @@ pub enum PostgresConnectError {
382382impl fmt:: Show for PostgresConnectError {
383383 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
384384 match * self {
385- InvalidUrl ( ref err) => write ! ( fmt. buf , "Invalid URL: {}" , err) ,
386- MissingUser => fmt . buf . write_str ( "User missing in URL" ) ,
385+ InvalidUrl ( ref err) => write ! ( fmt, "Invalid URL: {}" , err) ,
386+ MissingUser => write ! ( fmt , "User missing in URL" ) ,
387387 SocketError ( ref err) =>
388- write ! ( fmt. buf , "Unable to open connection to server: {}" , err) ,
388+ write ! ( fmt, "Unable to open connection to server: {}" , err) ,
389389 PgConnectDbError ( ref err) => err. fmt ( fmt) ,
390390 MissingPassword =>
391- fmt . buf . write_str ( "The server requested a password but none \
392- was provided") ,
391+ write ! ( fmt , "The server requested a password but none was \
392+ provided") ,
393393 UnsupportedAuthentication =>
394- fmt . buf . write_str ( "The server requested an unsupporeted \
395- authentication method") ,
394+ write ! ( fmt , "The server requested an unsupported \
395+ authentication method") ,
396396 NoSslSupport =>
397- fmt . buf . write_str ( "The server does not support SSL" ) ,
397+ write ! ( fmt , "The server does not support SSL" ) ,
398398 SslError ( ref err) =>
399- write ! ( fmt. buf , "Error initiating SSL session: {}" , err) ,
399+ write ! ( fmt, "Error initiating SSL session: {}" , err) ,
400400 PgConnectStreamError ( ref err) =>
401- write ! ( fmt. buf , "Error communicating with server: {}" , err) ,
401+ write ! ( fmt, "Error communicating with server: {}" , err) ,
402402 }
403403 }
404404}
@@ -506,7 +506,7 @@ impl PostgresDbError {
506506
507507impl fmt:: Show for PostgresDbError {
508508 fn fmt ( & self , fmt : & mut fmt:: Formatter ) -> fmt:: Result {
509- write ! ( fmt. buf , "{}: {}" , self . severity, self . message)
509+ write ! ( fmt, "{}: {}" , self . severity, self . message)
510510 }
511511}
512512
@@ -542,18 +542,18 @@ impl fmt::Show for PostgresError {
542542 match * self {
543543 PgDbError ( ref err) => err. fmt ( fmt) ,
544544 PgStreamError ( ref err) => err. fmt ( fmt) ,
545- PgStreamDesynchronized => fmt . buf . write_str (
546- "Communication with the server has desynchronized due to an \
547- earlier IO error") ,
548- PgWrongConnection => fmt . buf . write_str (
549- "A statement was executed with a connection it was not \
550- prepared with") ,
545+ PgStreamDesynchronized =>
546+ write ! ( fmt , "Communication with the server has desynchronized \
547+ due to an earlier IO error") ,
548+ PgWrongConnection =>
549+ write ! ( fmt , "A statement was executed with a connection it was \
550+ not prepared with") ,
551551 PgWrongParamCount { expected, actual } =>
552- write ! ( fmt. buf , "Expected {} parameters but got {}" , expected,
552+ write ! ( fmt, "Expected {} parameters but got {}" , expected,
553553 actual) ,
554- PgWrongType ( ref ty) => write ! ( fmt. buf , "Unexpected type {}" , ty) ,
555- PgInvalidColumn => fmt . buf . write_str ( "Invalid column" ) ,
556- PgWasNull => fmt . buf . write_str ( "The value was NULL" )
554+ PgWrongType ( ref ty) => write ! ( fmt, "Unexpected type {}" , ty) ,
555+ PgInvalidColumn => write ! ( fmt , "Invalid column" ) ,
556+ PgWasNull => write ! ( fmt , "The value was NULL" ) ,
557557 }
558558 }
559559}
0 commit comments