Use servo rust-url for test encoding
This commit is contained in:
parent
c253cc8e84
commit
eaf61bec7b
@ -22,4 +22,4 @@ git = "https://github.com/sfackler/rust-phf"
|
|||||||
git = "https://github.com/sfackler/rust-phf"
|
git = "https://github.com/sfackler/rust-phf"
|
||||||
|
|
||||||
[dev-dependencies.url]
|
[dev-dependencies.url]
|
||||||
git = "https://github.com/rust-lang/url"
|
git = "https://github.com/servo/rust-url"
|
||||||
|
@ -98,7 +98,8 @@ fn test_unix_connection() {
|
|||||||
|
|
||||||
let unix_socket_directory = unix_socket_directories[].split(',').next().unwrap();
|
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));
|
let conn = or_fail!(PostgresConnection::connect(url[], &NoSsl));
|
||||||
assert!(conn.finish().is_ok());
|
assert!(conn.finish().is_ok());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user