File tree Expand file tree Collapse file tree 5 files changed +31
-59
lines changed Expand file tree Collapse file tree 5 files changed +31
-59
lines changed Original file line number Diff line number Diff line change @@ -110,8 +110,15 @@ rpc = [
110110 " dep:quic-rpc-derive" ,
111111 " dep:serde-error" ,
112112 " dep:portable-atomic" ,
113+ " iroh-blobs/rpc" ,
113114]
114115
115116[package .metadata .docs .rs ]
116117all-features = true
117118rustdoc-args = [" --cfg" , " iroh_docsrs" ]
119+
120+ [patch .crates-io ]
121+ iroh-base = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
122+ iroh = { git = " https://github.com/n0-computer/iroh" , branch = " main" }
123+ iroh-blobs = { git = " https://github.com/n0-computer/iroh-blobs" , branch = " main" }
124+ 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 } )
Original file line number Diff line number Diff line change @@ -144,13 +144,13 @@ impl<S: BlobStore> Builder<S> {
144144 endpoint. clone ( ) ,
145145 local_pool. handle ( ) . clone ( ) ,
146146 ) ;
147- let blobs = Arc :: new ( iroh_blobs:: net_protocol:: Blobs :: new (
147+ let blobs = iroh_blobs:: net_protocol:: Blobs :: new (
148148 store. clone ( ) ,
149149 local_pool. handle ( ) . clone ( ) ,
150150 Default :: default ( ) ,
151151 downloader. clone ( ) ,
152152 endpoint. clone ( ) ,
153- ) ) ;
153+ ) ;
154154 let gossip = iroh_gossip:: net:: Gossip :: from_endpoint (
155155 endpoint. clone ( ) ,
156156 Default :: default ( ) ,
You can’t perform that action at this time.
0 commit comments