Skip to content

Commit 0e0357d

Browse files
authored
Merge branch 'quinn-rs:0.11.x' into 0.11.x
2 parents f84dfd2 + c8ad7e6 commit 0e0357d

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

quinn-proto/src/connection/packet_crypto.rs

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,12 @@ pub(super) fn decrypt_packet_body(
8888
&zero_rtt_crypto.unwrap().packet
8989
} else if packet_key_phase == conn_key_phase || space != SpaceId::Data {
9090
&spaces[space].crypto.as_ref().unwrap().packet.remote
91-
} else if let Some(prev) = prev_crypto.and_then(|crypto| {
92-
// If this packet comes prior to acknowledgment of the key update by the peer,
93-
if crypto.end_packet.is_none_or(|(pn, _)| number < pn) {
94-
// use the previous keys.
95-
Some(crypto)
96-
} else {
97-
// Otherwise, this must be a remotely-initiated key update, so fall through to the
98-
// final case.
99-
None
100-
}
101-
}) {
91+
} else if let Some(prev) = prev_crypto.filter(|&crypto|
92+
// Use the previous keys if this packet comes prior to acknowledgment of the
93+
// key update by the peer; otherwise, this must be a remotely-initiated key
94+
// update, so fall through to the final case.
95+
crypto.end_packet.is_none_or(|(pn, _)| number < pn))
96+
{
10297
&prev.crypto.remote
10398
} else {
10499
// We're in the Data space with a key phase mismatch and either there is no locally

quinn/src/recv_stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ impl Drop for RecvStream {
517517
.blocked_readers
518518
.contains_key(&self.stream),
519519
"Stream {} should not have a blocked reader when all data read is true",
520-
&self.stream
520+
self.stream
521521
);
522522
return;
523523
}

0 commit comments

Comments
 (0)