@@ -35,17 +35,18 @@ Here is a basic example of how to set up `iroh-blobs` with `iroh`:
3535``` rust,no_run
3636use iroh::{protocol::Router, Endpoint};
3737use iroh_blobs::{store::mem::MemStore, BlobsProtocol, ticket::BlobTicket};
38+ use n0_error::{Result, StdResultExt};
3839
3940#[tokio::main]
40- async fn main() -> n0_error:: Result<()> {
41+ async fn main() -> Result<()> {
4142 // create an iroh endpoint that includes the standard discovery mechanisms
4243 // we've built at number0
4344 let endpoint = Endpoint::bind().await?;
4445
4546 // create a protocol handler using an in-memory blob store.
4647 let store = MemStore::new();
4748 let tag = store.add_slice(b"Hello world").await?;
48-
49+
4950 let _ = endpoint.online().await;
5051 let addr = endpoint.addr();
5152 let ticket = BlobTicket::new(addr, tag.hash, tag.format);
@@ -62,7 +63,7 @@ async fn main() -> n0_error::Result<()> {
6263 tokio::signal::ctrl_c().await;
6364
6465 // clean shutdown of router and store
65- router.shutdown().await?;
66+ router.shutdown().await.anyerr() ?;
6667 Ok(())
6768}
6869```
@@ -86,4 +87,4 @@ at your option.
8687
8788Unless you explicitly state otherwise, any contribution intentionally submitted
8889for inclusion in this project by you, as defined in the Apache-2.0 license,
89- shall be dual licensed as above, without any additional terms or conditions.
90+ shall be dual licensed as above, without any additional terms or conditions.
0 commit comments