Skip to content

Commit

Permalink
More from @martinthomson
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Jul 3, 2024
1 parent 79c4a14 commit ec2d73c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions neqo-transport/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,8 +2269,7 @@ impl Connection {
let aead_expansion = tx.expansion();
builder.set_limit(profile.limit() - aead_expansion);
builder.enable_padding(needs_padding);
let limit = builder.limit();
debug_assert!(limit <= 2048);
debug_assert!(builder.limit() <= 2048);
if builder.is_full() {
encoder = builder.abort();
break;
Expand Down
3 changes: 1 addition & 2 deletions neqo-transport/src/packet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ impl PacketBuilder {
for v in values {
self.encode_varint(*v);
}
let limit = self.limit();
debug_assert!(self.len() <= limit);
debug_assert!(self.len() <= self.limit());
};
write
}
Expand Down
3 changes: 1 addition & 2 deletions neqo-transport/src/quic_datagrams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,7 @@ impl QuicDatagrams {
builder.encode(dgram.as_ref());
builder.mark_full();
}
let limit = builder.limit();
debug_assert!(builder.len() <= limit);
debug_assert!(builder.len() <= builder.limit());
stats.frame_tx.datagram += 1;
tokens.push(RecoveryToken::Datagram(*dgram.tracking()));
} else if tokens.is_empty() {
Expand Down
3 changes: 1 addition & 2 deletions neqo-transport/src/send_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,7 @@ impl SendStream {
} else {
builder.encode_vvec(&data[..length]);
}
let limit = builder.limit();
debug_assert!(builder.len() <= limit);
debug_assert!(builder.len() <= builder.limit());

self.mark_as_sent(offset, length, fin);
tokens.push(RecoveryToken::Stream(StreamRecoveryToken::Stream(
Expand Down

0 comments on commit ec2d73c

Please sign in to comment.