From f22a2f931d4d9daeaa5adf45681f1008bacf4563 Mon Sep 17 00:00:00 2001 From: Pixelstorm Date: Sat, 6 Apr 2024 16:43:01 +0100 Subject: [PATCH] Remove incorrect comment `lower_bound` would only work if there was at least 1 preexisting stream for the given priority. It would be possible to inspect the priority value when unwrapping the option, but I think this would be more complex that just explicitly specifying the full range for the priority in question. --- quinn-proto/src/connection/streams/mod.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/quinn-proto/src/connection/streams/mod.rs b/quinn-proto/src/connection/streams/mod.rs index d7da9406b0..337c19ec35 100644 --- a/quinn-proto/src/connection/streams/mod.rs +++ b/quinn-proto/src/connection/streams/mod.rs @@ -338,8 +338,6 @@ impl<'a> SendStream<'a> { /// Push a pending stream ID with the given priority, queued after all preexisting streams for the priority fn push_pending(pending: &mut BTreeMap, id: StreamId, priority: i32) { // Get all preexisting streams of this priority - // We only actually need the lowest recency value, so this could be implemented more tersely with - // `BTreeMap::lower_bound`, but as of writing that API is unfortunately still nightly only let mut range = pending.range(( Bound::Included(PendingPriority { priority,