Add convenience impl IntoConnectParams for String
This commit is contained in:
parent
333b62a8c2
commit
839b4914db
@ -66,6 +66,12 @@ impl<'a> IntoConnectParams for &'a str {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl IntoConnectParams for String {
|
||||||
|
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>> {
|
||||||
|
self.as_str().into_connect_params()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl IntoConnectParams for Url {
|
impl IntoConnectParams for Url {
|
||||||
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>> {
|
fn into_connect_params(self) -> Result<ConnectParams, Box<Error + Sync + Send>> {
|
||||||
let Url { host, port, user, path: url::Path { mut path, query: options, .. }, .. } = self;
|
let Url { host, port, user, path: url::Path { mut path, query: options, .. }, .. } = self;
|
||||||
|
Loading…
Reference in New Issue
Block a user