File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,5 +35,4 @@ optional = true
3535version = " 0.1"
3636
3737[dev-dependencies ]
38- # url = "0.2"
39-
38+ url = " 0.2"
Original file line number Diff line number Diff line change 33
44extern crate postgres;
55extern crate "rustc-serialize" as serialize;
6- // extern crate url;
6+ extern crate url;
77extern crate openssl;
88
99use openssl:: ssl:: SslContext ;
@@ -78,7 +78,6 @@ fn test_connection_finish() {
7878 assert ! ( conn. finish( ) . is_ok( ) ) ;
7979}
8080
81- /*
8281#[ test]
8382fn test_unix_connection ( ) {
8483 let conn = or_panic ! ( Connection :: connect( "postgres://postgres@localhost" , & SslMode :: None ) ) ;
@@ -93,11 +92,10 @@ fn test_unix_connection() {
9392 let unix_socket_directory = unix_socket_directories[ ] . split ( ',' ) . next ( ) . unwrap ( ) ;
9493
9594 let path = url:: utf8_percent_encode ( unix_socket_directory, url:: USERNAME_ENCODE_SET ) ;
96- let url = format!("postgres://postgres@{:? }", path);
97- let conn = or_panic!(Connection::connect(url[], &SslMode::None));
95+ let url = format ! ( "postgres://postgres@{}" , path) ;
96+ let conn = or_panic ! ( Connection :: connect( & url[ ] , & SslMode :: None ) ) ;
9897 assert ! ( conn. finish( ) . is_ok( ) ) ;
9998}
100- */
10199
102100#[ test]
103101fn test_transaction_commit ( ) {
You can’t perform that action at this time.
0 commit comments