File tree Expand file tree Collapse file tree 6 files changed +32
-5
lines changed Expand file tree Collapse file tree 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"
2727tower = { version = " 0.4" , features = [" util" ] }
2828
2929[dev-dependencies ]
30- tokio = { version = " 1" , features = [" macros" ] }
30+ tokio = { version = " 1" , features = [" macros" , " test-util " ] }
3131
3232[target .'cfg(any(target_os = "linux", target_os = "macos"))' .dev-dependencies ]
3333pnet_datalink = " 0.27.2"
3434
3535[features ]
36+ runtime = []
37+ tcp = []
38+ http1 = []
39+ http2 = []
3640
3741# internal features used in CI
3842__internal_happy_eyeballs_tests = []
Original file line number Diff line number Diff line change @@ -549,10 +549,10 @@ fn bind_local_address(
549549) -> io:: Result < ( ) > {
550550 match ( * dst_addr, local_addr_ipv4, local_addr_ipv6) {
551551 ( SocketAddr :: V4 ( _) , Some ( addr) , _) => {
552- socket. bind ( & SocketAddr :: new ( addr . clone ( ) . into ( ) , 0 ) . into ( ) ) ?;
552+ socket. bind ( & SocketAddr :: new ( ( * addr ) . into ( ) , 0 ) . into ( ) ) ?;
553553 }
554554 ( SocketAddr :: V6 ( _) , _, Some ( addr) ) => {
555- socket. bind ( & SocketAddr :: new ( addr . clone ( ) . into ( ) , 0 ) . into ( ) ) ?;
555+ socket. bind ( & SocketAddr :: new ( ( * addr ) . into ( ) , 0 ) . into ( ) ) ?;
556556 }
557557 _ => {
558558 if cfg ! ( windows) {
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ impl Connected {
169169 #[ cfg( feature = "http2" ) ]
170170 pub ( super ) fn clone ( & self ) -> Connected {
171171 Connected {
172- alpn : self . alpn . clone ( ) ,
172+ alpn : self . alpn ,
173173 is_proxied : self . is_proxied ,
174174 extra : self . extra . clone ( ) ,
175175 }
Original file line number Diff line number Diff line change @@ -935,7 +935,6 @@ mod tests {
935935 #[ cfg( feature = "runtime" ) ]
936936 #[ tokio:: test]
937937 async fn test_pool_timer_removes_expired ( ) {
938- let _ = pretty_env_logger:: try_init ( ) ;
939938 tokio:: time:: pause ( ) ;
940939
941940 let pool = Pool :: new (
Original file line number Diff line number Diff line change @@ -11,3 +11,6 @@ macro_rules! ready {
1111
1212pub ( crate ) use ready;
1313pub ( 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