From 4e6b8c6fe4fb1e056bd4ca7ea41fa240fbe31674 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 24 Feb 2021 20:33:00 +0100 Subject: [PATCH] quinn-proto: add comment to clarify need for custom iteration --- quinn-proto/src/connection/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index 5f9e2d0c5..96723324b 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -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];