File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ readme = "README.md"
1111edition = " 2018"
1212
1313[dependencies ]
14- futures-util = { version = " 0.3" , default-features = false , features = [" alloc" ] }
1514hex = " 0.4"
1615hyper = " 0.14"
1716tokio = { version = " 1.0" , features = [" net" ] }
Original file line number Diff line number Diff line change 1- use futures_util:: future:: BoxFuture ;
21use hex:: FromHex ;
32use hyper:: {
43 client:: connect:: { Connected , Connection } ,
@@ -8,6 +7,7 @@ use hyper::{
87use pin_project_lite:: pin_project;
98use std:: {
109 io,
10+ future:: Future ,
1111 path:: { Path , PathBuf } ,
1212 pin:: Pin ,
1313 task:: { Context , Poll } ,
@@ -81,7 +81,7 @@ impl Unpin for UnixConnector {}
8181impl Service < Uri > for UnixConnector {
8282 type Response = UnixStream ;
8383 type Error = std:: io:: Error ;
84- type Future = BoxFuture < ' static , Result < Self :: Response , Self :: Error > > ;
84+ type Future = Pin < Box < dyn Future < Output = Result < Self :: Response , Self :: Error > > + Send + ' static > > ;
8585 fn call ( & mut self , req : Uri ) -> Self :: Future {
8686 let fut = async move {
8787 let path = parse_socket_path ( req) ?;
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ use hyper::server::{Builder, Server};
55use conn:: SocketIncoming ;
66
77pub ( crate ) mod conn {
8- use futures_util:: ready;
98 use hyper:: server:: accept:: Accept ;
109 use pin_project_lite:: pin_project;
1110 use std:: {
@@ -51,8 +50,8 @@ pub(crate) mod conn {
5150 self : Pin < & mut Self > ,
5251 cx : & mut Context < ' _ > ,
5352 ) -> Poll < Option < Result < Self :: Conn , Self :: Error > > > {
54- let conn = ready ! ( self . listener. poll_accept( cx) ) ? . 0 ;
55- Poll :: Ready ( Some ( Ok ( conn) ) )
53+ self . listener . poll_accept ( cx) ?
54+ . map ( | ( conn , _ ) | Some ( Ok ( conn) ) )
5655 }
5756 }
5857
You can’t perform that action at this time.
0 commit comments