Bump MSRV to 1.82 (for qlog -> serde_with)

This commit is contained in:
Dirkjan Ochtman
2026-04-07 12:41:08 +02:00
parent d24f5c6569
commit 905e1090f9
6 changed files with 9 additions and 20 deletions
+1 -1
View File
@@ -162,7 +162,7 @@ jobs:
steps:
- uses: actions/checkout@v6
# Note that we must also update the README when changing the MSRV
- uses: dtolnay/rust-toolchain@1.80.0
- uses: dtolnay/rust-toolchain@1.82.0
- uses: Swatinem/rust-cache@v2
- run: cargo check --locked --lib --all-features -p quinn-udp -p quinn-proto -p quinn
+1 -1
View File
@@ -4,7 +4,7 @@ default-members = ["quinn", "quinn-proto", "quinn-udp", "bench", "perf"]
resolver = "2"
[workspace.package]
rust-version = "1.80.0"
rust-version = "1.82.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/quinn-rs/quinn"
+4 -11
View File
@@ -1146,11 +1146,7 @@ impl Connection {
self.spaces[SpaceId::Data].pending.new_cids.push(frame);
});
// Update Timer::PushNewCid
if self
.timers
.get(Timer::PushNewCid)
.map_or(true, |x| x <= now)
{
if self.timers.get(Timer::PushNewCid).is_none_or(|x| x <= now) {
self.reset_cid_retirement();
}
}
@@ -1443,10 +1439,7 @@ impl Connection {
}
let new_largest = {
let space = &mut self.spaces[space];
if space
.largest_acked_packet
.map_or(true, |pn| ack.largest > pn)
{
if space.largest_acked_packet.is_none_or(|pn| ack.largest > pn) {
space.largest_acked_packet = Some(ack.largest);
if let Some(info) = space.sent_packets.get(&ack.largest) {
// This should always succeed, but a misbehaving peer might ACK a packet we
@@ -1890,7 +1883,7 @@ impl Connection {
continue;
};
let pto = last_ack_eliciting + duration;
if result.map_or(true, |(earliest_pto, _)| pto < earliest_pto) {
if result.is_none_or(|(earliest_pto, _)| pto < earliest_pto) {
result = Some((pto, space));
}
}
@@ -3672,7 +3665,7 @@ impl Connection {
.filter(|&&t| !matches!(t, Timer::KeepAlive | Timer::PushNewCid | Timer::KeyDiscard))
.filter_map(|&t| Some((t, self.timers.get(t)?)))
.min_by_key(|&(_, time)| time)
.map_or(true, |(timer, _)| timer == Timer::Idle)
.is_none_or(|(timer, _)| timer == Timer::Idle)
}
/// Whether explicit congestion notification is in use on outgoing packets.
+1 -1
View File
@@ -90,7 +90,7 @@ pub(super) fn decrypt_packet_body(
&spaces[space].crypto.as_ref().unwrap().packet.remote
} else if let Some(prev) = prev_crypto.and_then(|crypto| {
// If this packet comes prior to acknowledgment of the key update by the peer,
if crypto.end_packet.map_or(true, |(pn, _)| number < pn) {
if crypto.end_packet.is_none_or(|(pn, _)| number < pn) {
// use the previous keys.
Some(crypto)
} else {
+1 -5
View File
@@ -338,11 +338,7 @@ impl RttEstimator {
} else {
self.latest
};
let var_sample = if smoothed > adjusted_rtt {
smoothed - adjusted_rtt
} else {
adjusted_rtt - smoothed
};
let var_sample = smoothed.abs_diff(adjusted_rtt);
self.var = (3 * self.var + var_sample) / 4;
self.smoothed = Some((7 * smoothed + adjusted_rtt) / 8);
} else {
+1 -1
View File
@@ -775,7 +775,7 @@ impl PendingAcks {
pub(super) fn insert_one(&mut self, packet: u64, now: Instant) {
self.ranges.insert_one(packet);
if self.largest_packet.map_or(true, |(pn, _)| packet > pn) {
if self.largest_packet.is_none_or(|(pn, _)| packet > pn) {
self.largest_packet = Some((packet, now));
}