diff --git a/Cargo.lock b/Cargo.lock index 52e4e12..67d9691 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -786,9 +786,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" +checksum = "afa489199eaffb1211795df1c6236ce1ad0d41a6fa45250add73e3b02420f06e" dependencies = [ "percent-encoding", ] @@ -881,6 +881,19 @@ version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" +[[package]] +name = "futures-lite" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad" +dependencies = [ + "fastrand", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.34" @@ -1866,6 +1879,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.5" @@ -1896,8 +1915,8 @@ dependencies = [ "anyhow", "ctor", "derive_more", - "futures", "futures-buffered", + "futures-lite", "hickory-proto", "hickory-resolver", "ipnet", @@ -3244,9 +3263,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "url" -version = "2.5.8" +version = "2.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed" +checksum = "f00cd2407bb42c0ef17be88d4cf020f5cceffd121665bac9b8b9493a369b3b1a" dependencies = [ "form_urlencoded", "idna", diff --git a/patchbay/Cargo.toml b/patchbay/Cargo.toml index 2700d4d..9110e56 100644 --- a/patchbay/Cargo.toml +++ b/patchbay/Cargo.toml @@ -15,7 +15,7 @@ iroh-metrics = ["dep:iroh-metrics"] iroh-metrics = { version = "1.0.2", optional = true } anyhow = "1" derive_more = { version = "2.1.1", features = ["debug", "display", "eq"] } -futures = "0.3" +futures-lite = "2.6" ipnet = { version = "2.12", features = ["serde"] } libc = "0.2" netlink-packet-core = "0.9" diff --git a/patchbay/src/netlink.rs b/patchbay/src/netlink.rs index af1369d..7ba77bc 100644 --- a/patchbay/src/netlink.rs +++ b/patchbay/src/netlink.rs @@ -6,7 +6,7 @@ use std::{ }; use anyhow::{anyhow, Context, Result}; -use futures::StreamExt; +use futures_lite::StreamExt; use netlink_packet_core::{ NetlinkHeader, NetlinkMessage, NetlinkPayload, NLM_F_ACK, NLM_F_CREATE, NLM_F_DUMP, NLM_F_EXCL, NLM_F_REPLACE, NLM_F_REQUEST, diff --git a/patchbay/src/tests/nat.rs b/patchbay/src/tests/nat.rs index 47b6a34..691c24b 100644 --- a/patchbay/src/tests/nat.rs +++ b/patchbay/src/tests/nat.rs @@ -269,8 +269,8 @@ async fn wan_pool_selection() -> Result<()> { #[tokio::test(flavor = "current_thread")] #[traced_test] async fn reflexive_ip_all_combos() -> Result<()> { - use futures::StreamExt as _; use futures_buffered::BufferedStreamExt; + use futures_lite::StreamExt as _; use strum::IntoEnumIterator; // Nat::None + Via*Isp is skipped: no return route from DC → device subnet. @@ -284,7 +284,7 @@ async fn reflexive_ip_all_combos() -> Result<()> { .flat_map(|(m, w, p)| BindMode::iter().map(move |b| (m, w, p, b))) .collect(); - let failures: Vec = futures::stream::iter(combos.into_iter().enumerate().map( + let failures: Vec = futures_lite::stream::iter(combos.into_iter().enumerate().map( |(i, (mode, wiring, proto, bind))| { let port_base = 14_000u16 + (i as u16) * 10; async move { @@ -309,7 +309,7 @@ async fn reflexive_ip_all_combos() -> Result<()> { }, )) .buffered_unordered(8) - .filter_map(|x| async { x }) + .filter_map(|x| x) .collect() .await;