Skip to content

Commit

Permalink
Remove incorrect comment
Browse files Browse the repository at this point in the history
`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.
  • Loading branch information
BigWingBeat committed Apr 6, 2024
1 parent ab57579 commit f22a2f9
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions quinn-proto/src/connection/streams/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PendingPriority, StreamId>, 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,
Expand Down

0 comments on commit f22a2f9

Please sign in to comment.