From 2dac6af496d1ff486dd78f58f6f41f8af57793a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Klaehn?= Date: Wed, 10 Apr 2024 18:51:33 +0300 Subject: [PATCH] refactor(iroh-bytes): use even newer bao-tree (#2168) ## Description refactor(iroh-bytes): use even newer bao-tree There is a new version of bao-tree that fixes some long standing api consistency issues and drops the tokio dependency. This updates iroh to use it. We of course still use tokio, but switching to something else would be easier at least as far as bao-tree is concerned. The other change is that encode_ranges_validated no longer writes the length prefix, so we have to do this ourselves. This was done to simplify the bao-tree API and make it more flexible. ## Notes & open questions ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant. --- Cargo.lock | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c3b2ec4fa8..20fd76df40 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -313,9 +313,9 @@ dependencies = [ [[package]] name = "bao-tree" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ae2f5c25ce9df1d21b6d2cfe8e1517ff78bd65476bfc47a1ac5b657fa0e1df" +checksum = "f1f7a89a8ee5889d2593ae422ce6e1bb03e48a0e8a16e4fa0882dfcbe7e182ef" dependencies = [ "bytes", "futures-lite", @@ -326,7 +326,6 @@ dependencies = [ "range-collections", "self_cell", "smallvec", - "tokio", ] [[package]] @@ -2516,12 +2515,12 @@ dependencies = [ [[package]] name = "iroh-io" -version = "0.4.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd67e386f948a6f09e71057b48fff51b6414f0080997495b5bdf2d1bdcdbe46" +checksum = "74d1047ad5ca29ab4ff316b6830d86e7ea52cea54325e4d4a849692e1274b498" dependencies = [ "bytes", - "futures", + "futures-lite", "pin-project", "smallvec", "tokio",