File tree Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Expand file tree Collapse file tree 1 file changed +8
-17
lines changed Original file line number Diff line number Diff line change 3636//! # }
3737//! ```
3838
39- use std:: { fmt:: Debug , future :: Future , ops:: Deref , sync:: Arc } ;
39+ use std:: { fmt:: Debug , ops:: Deref , sync:: Arc } ;
4040
4141use iroh:: {
4242 endpoint:: Connection ,
@@ -100,25 +100,16 @@ impl BlobsProtocol {
100100}
101101
102102impl ProtocolHandler for BlobsProtocol {
103- fn accept (
104- & self ,
105- conn : Connection ,
106- ) -> impl Future < Output = std:: result:: Result < ( ) , AcceptError > > + Send {
103+ async fn accept ( & self , conn : Connection ) -> std:: result:: Result < ( ) , AcceptError > {
107104 let store = self . store ( ) . clone ( ) ;
108105 let events = self . inner . events . clone ( ) ;
109-
110- Box :: pin ( async move {
111- crate :: provider:: handle_connection ( conn, store, events) . await ;
112- Ok ( ( ) )
113- } )
106+ crate :: provider:: handle_connection ( conn, store, events) . await ;
107+ Ok ( ( ) )
114108 }
115109
116- fn shutdown ( & self ) -> impl Future < Output = ( ) > + Send {
117- let store = self . store ( ) . clone ( ) ;
118- Box :: pin ( async move {
119- if let Err ( cause) = store. shutdown ( ) . await {
120- error ! ( "error shutting down store: {:?}" , cause) ;
121- }
122- } )
110+ async fn shutdown ( & self ) {
111+ if let Err ( cause) = self . store ( ) . shutdown ( ) . await {
112+ error ! ( "error shutting down store: {:?}" , cause) ;
113+ }
123114 }
124115}
You can’t perform that action at this time.
0 commit comments