quinn-proto: add comment to clarify need for custom iteration

This commit is contained in:
Dirkjan Ochtman
2021-02-24 20:33:00 +01:00
committed by Benjamin Saunders
parent c4af9ecb1c
commit 4e6b8c6fe4
+2
View File
@@ -438,6 +438,8 @@ where
// Iterate over all spaces and find data to send
let mut space_idx = 0;
let spaces = [SpaceId::Initial, SpaceId::Handshake, SpaceId::Data];
// This loop will potentially spend multiple iterations in the same `SpaceId`,
// so we cannot trivially rewrite it to take advantage of `SpaceId::iter()`.
while space_idx < spaces.len() {
let space_id = spaces[space_idx];