@@ -84,60 +84,62 @@ use std::str;
8484use std:: task;
8585use std:: util;
8686
87- use self :: error:: { PostgresDbError ,
88- PostgresConnectError ,
89- InvalidUrl ,
90- DnsError ,
91- SocketError ,
92- NoSslSupport ,
93- SslError ,
94- MissingUser ,
95- DbError ,
96- UnsupportedAuthentication ,
97- MissingPassword } ;
98- use self :: message:: { BackendMessage ,
99- AuthenticationOk ,
100- AuthenticationKerberosV5 ,
101- AuthenticationCleartextPassword ,
102- AuthenticationMD5Password ,
103- AuthenticationSCMCredential ,
104- AuthenticationGSS ,
105- AuthenticationSSPI ,
106- BackendKeyData ,
107- BindComplete ,
108- CommandComplete ,
109- DataRow ,
110- EmptyQueryResponse ,
111- ErrorResponse ,
112- NoData ,
113- NoticeResponse ,
114- NotificationResponse ,
115- ParameterDescription ,
116- ParameterStatus ,
117- ParseComplete ,
118- PortalSuspended ,
119- ReadyForQuery ,
120- RowDescription } ;
121- use self :: message:: { FrontendMessage ,
122- Bind ,
123- CancelRequest ,
124- Close ,
125- Describe ,
126- Execute ,
127- Parse ,
128- PasswordMessage ,
129- Query ,
130- StartupMessage ,
131- SslRequest ,
132- Sync ,
133- Terminate } ;
134- use self :: message:: { RowDescriptionEntry , WriteMessage , ReadMessage } ;
135- use self :: types:: { Oid , PostgresType , ToSql , FromSql , PgUnknownType } ;
87+ use error:: { PostgresDbError ,
88+ PostgresConnectError ,
89+ InvalidUrl ,
90+ DnsError ,
91+ SocketError ,
92+ NoSslSupport ,
93+ SslError ,
94+ MissingUser ,
95+ DbError ,
96+ UnsupportedAuthentication ,
97+ MissingPassword } ;
98+ use message:: { BackendMessage ,
99+ AuthenticationOk ,
100+ AuthenticationKerberosV5 ,
101+ AuthenticationCleartextPassword ,
102+ AuthenticationMD5Password ,
103+ AuthenticationSCMCredential ,
104+ AuthenticationGSS ,
105+ AuthenticationSSPI ,
106+ BackendKeyData ,
107+ BindComplete ,
108+ CommandComplete ,
109+ DataRow ,
110+ EmptyQueryResponse ,
111+ ErrorResponse ,
112+ NoData ,
113+ NoticeResponse ,
114+ NotificationResponse ,
115+ ParameterDescription ,
116+ ParameterStatus ,
117+ ParseComplete ,
118+ PortalSuspended ,
119+ ReadyForQuery ,
120+ RowDescription } ;
121+ use message:: { FrontendMessage ,
122+ Bind ,
123+ CancelRequest ,
124+ Close ,
125+ Describe ,
126+ Execute ,
127+ Parse ,
128+ PasswordMessage ,
129+ Query ,
130+ StartupMessage ,
131+ SslRequest ,
132+ Sync ,
133+ Terminate } ;
134+ use message:: { RowDescriptionEntry , WriteMessage , ReadMessage } ;
135+ use types:: { Oid , PostgresType , ToSql , FromSql , PgUnknownType } ;
136136
137137pub mod error;
138138pub mod pool;
139139mod message;
140140pub mod types;
141+ #[ cfg( test) ]
142+ mod tests;
141143
142144static DEFAULT_PORT : Port = 5432 ;
143145
0 commit comments