From 8e4e7620d4e2ea2ca7a4334a1a5cd2b0b74e21c7 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Mon, 4 Nov 2024 08:30:19 -0800 Subject: [PATCH] Fix some packet/datagram confusion in comments --- quinn-proto/src/connection/mod.rs | 2 +- quinn-proto/src/connection/packet_builder.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/quinn-proto/src/connection/mod.rs b/quinn-proto/src/connection/mod.rs index 1d5628426..2cd4b00dc 100644 --- a/quinn-proto/src/connection/mod.rs +++ b/quinn-proto/src/connection/mod.rs @@ -705,7 +705,7 @@ impl Connection { break; } - // Pad the current packet to GSO segment size so it can be included in the + // Pad the current datagram to GSO segment size so it can be included in the // GSO batch. builder.pad_to(segment_size as u16); } diff --git a/quinn-proto/src/connection/packet_builder.rs b/quinn-proto/src/connection/packet_builder.rs index 70a9867f2..f9282bec8 100644 --- a/quinn-proto/src/connection/packet_builder.rs +++ b/quinn-proto/src/connection/packet_builder.rs @@ -173,8 +173,8 @@ impl PacketBuilder { }) } - /// Append the minimum amount of padding such that, after encryption, the packet will occupy at - /// least `min_size` bytes + /// Append the minimum amount of padding to the packet such that, after encryption, the + /// enclosing datagram will occupy at least `min_size` bytes pub(super) fn pad_to(&mut self, min_size: u16) { let prev = self.min_size; self.min_size = self.datagram_start + (min_size as usize) - self.tag_len;