Skip to content

Commit 536f5a3

Browse files
authored
Merge pull request sfackler#206 from p512/master
Added convenience impl IntoConnectParams for String
2 parents 333b62a + 839b491 commit 536f5a3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/params.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ impl<'a> IntoConnectParams for &'a str {
6666
}
6767
}
6868

69+
impl IntoConnectParams for String {
70+
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>> {
71+
self.as_str().into_connect_params()
72+
}
73+
}
74+
6975
impl IntoConnectParams for Url {
7076
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>> {
7177
let Url { host, port, user, path: url::Path { mut path, query: options, .. }, .. } = self;

0 commit comments

Comments
 (0)