Revert Dig's merge fixed to bring back const

This reverts commit 44a3dc6e45.
This commit is contained in:
Diva M
2025-10-01 12:15:58 -05:00
parent 2e95861ce8
commit 4d39665d48
4 changed files with 10 additions and 4 deletions
Generated
+1 -1
View File
@@ -1072,7 +1072,7 @@ dependencies = [
[[package]]
name = "iroh-quinn"
version = "0.14.0"
version = "0.13.0"
dependencies = [
"anyhow",
"async-executor",
+1 -1
View File
@@ -11,6 +11,6 @@ categories.workspace = true
[dependencies]
anyhow.workspace = true
bytes = { workspace = true }
quinn = { version = "0.14", path = "../../quinn", package = "iroh-quinn" }
quinn = { version = "0.13", path = "../../quinn", package = "iroh-quinn" }
rcgen.workspace = true
rustls.workspace = true
+7
View File
@@ -1467,3 +1467,10 @@ pub enum SendDatagramError {
/// This limits the amount of CPU resources consumed by datagram generation,
/// and allows other tasks (like receiving ACKs) to run in between.
const MAX_TRANSMIT_DATAGRAMS: usize = 20;
/// The maximum amount of datagrams that are sent in a single transmit
///
/// This can be lower than the maximum platform capabilities, to avoid excessive
/// memory allocations when calling `poll_transmit()`. Benchmarks have shown
/// that numbers around 10 are a good compromise.
const MAX_TRANSMIT_SEGMENTS: usize = 10;
+1 -2
View File
@@ -171,8 +171,7 @@ where
// obtain an `&mut WritableFut` after storing it in `self.writable_fut` when `self` is already behind `Pin`,
// and if we didn't store it then we wouldn't be able to keep it alive between
// `poll_send` calls.
let result =
std::task::ready!(this.writable_fut.as_mut().as_pin_mut().unwrap().poll(cx));
let result = ready!(this.writable_fut.as_mut().as_pin_mut().unwrap().poll(cx));
// Polling an arbitrary `Future` after it becomes ready is a logic error, so arrange for
// a new `Future` to be created on the next call.