File tree 3 files changed +25
-0
lines changed 3 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 14
14
* Support for Redis 6 auth ([ #341 ] ( https://github.com/mitsuhiko/redis-rs/pull/341 ) )
15
15
* BUGFIX: Make aio::Connection Sync again ([ #321 ] ( https://github.com/mitsuhiko/redis-rs/pull/321 ) )
16
16
* BUGFIX: Return UnexpectedEof if we try to decode at eof ([ #322 ] ( https://github.com/mitsuhiko/redis-rs/pull/322 ) )
17
+ * Added support to create a connection from a (host, port) tuple ([ #370 ] ( https://github.com/mitsuhiko/redis-rs/pull/370 ) )
17
18
18
19
## [ 0.16.0] ( https://github.com/mitsuhiko/redis-rs/compare/0.15.1...0.16.0 ) - 2020-05-10
19
20
Original file line number Diff line number Diff line change @@ -245,3 +245,13 @@ impl ConnectionLike for Client {
245
245
}
246
246
}
247
247
}
248
+
249
+ #[ cfg( test) ]
250
+ mod test {
251
+ use super :: * ;
252
+
253
+ #[ test]
254
+ fn regression_293_parse_ipv6_with_interface ( ) {
255
+ assert ! ( Client :: open( ( "fe80::cafe:beef%eno1" , 6379 ) ) . is_ok( ) ) ;
256
+ }
257
+ }
Original file line number Diff line number Diff line change @@ -132,6 +132,20 @@ impl<'a> IntoConnectionInfo for &'a str {
132
132
}
133
133
}
134
134
135
+ impl < T > IntoConnectionInfo for ( T , u16 )
136
+ where
137
+ T : Into < String > ,
138
+ {
139
+ fn into_connection_info ( self ) -> RedisResult < ConnectionInfo > {
140
+ Ok ( ConnectionInfo {
141
+ addr : Box :: new ( ConnectionAddr :: Tcp ( self . 0 . into ( ) , self . 1 ) ) ,
142
+ db : 0 ,
143
+ username : None ,
144
+ passwd : None ,
145
+ } )
146
+ }
147
+ }
148
+
135
149
impl IntoConnectionInfo for String {
136
150
fn into_connection_info ( self ) -> RedisResult < ConnectionInfo > {
137
151
match parse_redis_url ( & self ) {
You can’t perform that action at this time.
0 commit comments