File tree Expand file tree Collapse file tree 4 files changed +28
-57
lines changed Expand file tree Collapse file tree 4 files changed +28
-57
lines changed Original file line number Diff line number Diff line change @@ -115,3 +115,9 @@ rpc = [
115115[package .metadata .docs .rs ]
116116all-features = true
117117rustdoc-args = [" --cfg" , " iroh_docsrs" ]
118+
119+ [patch .crates-io ]
120+ iroh-base = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
121+ iroh = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
122+ iroh-blobs = { git = " https://github.com/n0-computer/iroh-blobs" , branch = " main" }
123+ iroh-gossip = { git = " https://github.com/n0-computer/iroh-gossip" , branch = " main" }
Original file line number Diff line number Diff line change @@ -37,4 +37,8 @@ ignore = [
3737]
3838
3939[sources ]
40- allow-git = []
40+ allow-git = [
41+ " https://github.com/n0-computer/iroh.git" ,
42+ " https://github.com/n0-computer/iroh-blobs.git" ,
43+ " https://github.com/n0-computer/iroh-gossip.git" ,
44+ ]
Original file line number Diff line number Diff line change 11//! [`ProtocolHandler`] implementation for the docs [`Engine`].
22
3- use std:: sync:: Arc ;
4-
53use anyhow:: Result ;
64use futures_lite:: future:: Boxed as BoxedFuture ;
75use iroh:: { endpoint:: Connecting , protocol:: ProtocolHandler } ;
86
97use crate :: engine:: Engine ;
108
119impl < D : iroh_blobs:: store:: Store > ProtocolHandler for Engine < D > {
12- fn accept ( self : Arc < Self > , conn : Connecting ) -> BoxedFuture < Result < ( ) > > {
13- Box :: pin ( async move { self . handle_connection ( conn) . await } )
10+ fn accept ( & self , conn : Connecting ) -> BoxedFuture < Result < ( ) > > {
11+ let this = self . clone ( ) ;
12+ Box :: pin ( async move { this. handle_connection ( conn) . await } )
1413 }
1514
16- fn shutdown ( self : Arc < Self > ) -> BoxedFuture < ( ) > {
15+ fn shutdown ( & self ) -> BoxedFuture < ( ) > {
16+ let this = self . clone ( ) ;
1717 Box :: pin ( async move {
18- if let Err ( err) = ( * self ) . shutdown ( ) . await {
18+ if let Err ( err) = this . shutdown ( ) . await {
1919 tracing:: warn!( "shutdown error: {:?}" , err) ;
2020 }
2121 } )
You can’t perform that action at this time.
0 commit comments