diff --git a/Cargo.lock b/Cargo.lock index 17fe088..2cabaf2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1869,8 +1869,8 @@ checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" [[package]] name = "iroh" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "anyhow", "async-channel", @@ -1913,8 +1913,8 @@ dependencies = [ [[package]] name = "iroh-base" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "aead", "anyhow", @@ -1954,8 +1954,8 @@ dependencies = [ [[package]] name = "iroh-blobs" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "anyhow", "async-channel", @@ -1996,8 +1996,8 @@ dependencies = [ [[package]] name = "iroh-docs" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "anyhow", "async-channel", @@ -2034,8 +2034,8 @@ dependencies = [ [[package]] name = "iroh-gossip" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "anyhow", "async-channel", @@ -2074,8 +2074,8 @@ dependencies = [ [[package]] name = "iroh-metrics" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "anyhow", "erased_set", @@ -2094,8 +2094,8 @@ dependencies = [ [[package]] name = "iroh-net" -version = "0.25.0" -source = "git+https://github.com/izihawa/iroh?branch=main#1361fa5bf6e6d0be405c5e69d200dd5d9bb589f7" +version = "0.26.0" +source = "git+https://github.com/izihawa/iroh?branch=main#8c1f8586b152b9104ad62ccfc71519a4b829c1ac" dependencies = [ "anyhow", "backoff", diff --git a/bin/main.rs b/bin/main.rs index bc0b534..89c468a 100644 --- a/bin/main.rs +++ b/bin/main.rs @@ -11,6 +11,7 @@ use clap::{Parser, Subcommand}; use futures::TryStreamExt; use headers::{HeaderMap, HeaderMapExt, Range}; use hyper::header; +use iroh::client::blobs::ReadAtLen; use iroh::client::docs::ShareMode; use iroh::docs::store::DownloadPolicy; use iroh_base::hash::Hash; @@ -639,7 +640,11 @@ async fn table_get( iroh_node .client() .blobs() - .read_at(entry.content_hash(), offset, length.map(|x| x as usize)) + .read_at( + entry.content_hash(), + offset, + length.map_or(ReadAtLen::All, ReadAtLen::Exact), + ) .await .map_err(Error::blobs), response_builder