Skip to content

Commit eaf61be

Browse files
committed
Use servo rust-url for test encoding
1 parent c253cc8 commit eaf61be

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ git = "https://github.com/sfackler/rust-phf"
2222
git = "https://github.com/sfackler/rust-phf"
2323

2424
[dev-dependencies.url]
25-
git = "https://github.com/rust-lang/url"
25+
git = "https://github.com/servo/rust-url"

tests/test.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ fn test_unix_connection() {
9898

9999
let unix_socket_directory = unix_socket_directories[].split(',').next().unwrap();
100100

101-
let url = format!("postgres://postgres@{}", url::encode_component(unix_socket_directory));
101+
let path = url::utf8_percent_encode(unix_socket_directory, url::PASSWORD_ENCODE_SET);
102+
let url = format!("postgres://postgres@{}", path);
102103
let conn = or_fail!(PostgresConnection::connect(url[], &NoSsl));
103104
assert!(conn.finish().is_ok());
104105
}

0 commit comments

Comments
 (0)