@@ -27,10 +27,9 @@ static DEFAULT_PORT: u16 = 6379;
27
27
pub fn parse_redis_url ( input : & str ) -> Result < url:: Url , ( ) > {
28
28
match url:: Url :: parse ( input) {
29
29
Ok ( result) => {
30
- if result. scheme ( ) == "redis" || result. scheme ( ) == "unix" {
31
- Ok ( result)
32
- } else {
33
- Err ( ( ) )
30
+ match result. scheme ( ) {
31
+ "redis" | "redis+unix" | "unix" => Ok ( result) ,
32
+ _ => Err ( ( ) )
34
33
}
35
34
} ,
36
35
Err ( _) => Err ( ( ) ) ,
@@ -62,7 +61,7 @@ impl ConnectionAddr {
62
61
#[ cfg( any( feature="with-unix-sockets" , feature="with-system-unix-sockets" ) ) ]
63
62
ConnectionAddr :: Unix ( _) => true ,
64
63
#[ cfg( not( any( feature="with-unix-sockets" , feature="with-system-unix-sockets" ) ) ) ]
65
- ConnectionAddr :: Unix ( _) => false ,
64
+ ConnectionInfo :: Unix ( _) => false ,
66
65
}
67
66
}
68
67
}
@@ -145,7 +144,7 @@ impl IntoConnectionInfo for url::Url {
145
144
fn into_connection_info ( self ) -> RedisResult < ConnectionInfo > {
146
145
if self . scheme ( ) == "redis" {
147
146
url_to_tcp_connection_info ( self )
148
- } else if self . scheme ( ) == "unix" {
147
+ } else if self . scheme ( ) == "unix" || self . scheme ( ) == "redis+unix" {
149
148
url_to_unix_connection_info ( self )
150
149
} else {
151
150
fail ! ( ( ErrorKind :: InvalidClientConfig , "URL provided is not a redis URL" ) ) ;
0 commit comments