File tree 6 files changed +32
-5
lines changed
6 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,16 @@ tower-service = "0.3"
27
27
tower = { version = " 0.4" , features = [" util" ] }
28
28
29
29
[dev-dependencies ]
30
- tokio = { version = " 1" , features = [" macros" ] }
30
+ tokio = { version = " 1" , features = [" macros" , " test-util " ] }
31
31
32
32
[target .'cfg(any(target_os = "linux", target_os = "macos"))' .dev-dependencies ]
33
33
pnet_datalink = " 0.27.2"
34
34
35
35
[features ]
36
+ runtime = []
37
+ tcp = []
38
+ http1 = []
39
+ http2 = []
36
40
37
41
# internal features used in CI
38
42
__internal_happy_eyeballs_tests = []
Original file line number Diff line number Diff line change @@ -549,10 +549,10 @@ fn bind_local_address(
549
549
) -> io:: Result < ( ) > {
550
550
match ( * dst_addr, local_addr_ipv4, local_addr_ipv6) {
551
551
( SocketAddr :: V4 ( _) , Some ( addr) , _) => {
552
- socket. bind ( & SocketAddr :: new ( addr . clone ( ) . into ( ) , 0 ) . into ( ) ) ?;
552
+ socket. bind ( & SocketAddr :: new ( ( * addr ) . into ( ) , 0 ) . into ( ) ) ?;
553
553
}
554
554
( SocketAddr :: V6 ( _) , _, Some ( addr) ) => {
555
- socket. bind ( & SocketAddr :: new ( addr . clone ( ) . into ( ) , 0 ) . into ( ) ) ?;
555
+ socket. bind ( & SocketAddr :: new ( ( * addr ) . into ( ) , 0 ) . into ( ) ) ?;
556
556
}
557
557
_ => {
558
558
if cfg ! ( windows) {
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl Connected {
169
169
#[ cfg( feature = "http2" ) ]
170
170
pub ( super ) fn clone ( & self ) -> Connected {
171
171
Connected {
172
- alpn : self . alpn . clone ( ) ,
172
+ alpn : self . alpn ,
173
173
is_proxied : self . is_proxied ,
174
174
extra : self . extra . clone ( ) ,
175
175
}
Original file line number Diff line number Diff line change @@ -935,7 +935,6 @@ mod tests {
935
935
#[ cfg( feature = "runtime" ) ]
936
936
#[ tokio:: test]
937
937
async fn test_pool_timer_removes_expired ( ) {
938
- let _ = pretty_env_logger:: try_init ( ) ;
939
938
tokio:: time:: pause ( ) ;
940
939
941
940
let pool = Pool :: new (
Original file line number Diff line number Diff line change @@ -11,3 +11,6 @@ macro_rules! ready {
11
11
12
12
pub ( crate ) use ready;
13
13
pub ( crate ) mod exec;
14
+ pub ( crate ) mod never;
15
+
16
+ pub ( crate ) use never:: Never ;
Original file line number Diff line number Diff line change
1
+ //! An uninhabitable type meaning it can never happen.
2
+ //!
3
+ //! To be replaced with `!` once it is stable.
4
+
5
+ use std:: error:: Error ;
6
+ use std:: fmt;
7
+
8
+ #[ derive( Debug ) ]
9
+ pub ( crate ) enum Never { }
10
+
11
+ impl fmt:: Display for Never {
12
+ fn fmt ( & self , _: & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
13
+ match * self { }
14
+ }
15
+ }
16
+
17
+ impl Error for Never {
18
+ fn description ( & self ) -> & str {
19
+ match * self { }
20
+ }
21
+ }
You can’t perform that action at this time.
0 commit comments