Use servo rust-url for test encoding

This commit is contained in:
Steven Fackler 2014-10-26 12:05:43 -07:00
parent c253cc8e84
commit eaf61bec7b
2 changed files with 3 additions and 2 deletions

View File

@ -22,4 +22,4 @@ git = "https://github.com/sfackler/rust-phf"
git = "https://github.com/sfackler/rust-phf"
[dev-dependencies.url]
git = "https://github.com/rust-lang/url"
git = "https://github.com/servo/rust-url"

View File

@ -98,7 +98,8 @@ fn test_unix_connection() {
let unix_socket_directory = unix_socket_directories[].split(',').next().unwrap();
let url = format!("postgres://postgres@{}", url::encode_component(unix_socket_directory));
let path = url::utf8_percent_encode(unix_socket_directory, url::PASSWORD_ENCODE_SET);
let url = format!("postgres://postgres@{}", path);
let conn = or_fail!(PostgresConnection::connect(url[], &NoSsl));
assert!(conn.finish().is_ok());
}