diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0c852367a2..3b2cc3d4c3a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -220,7 +220,7 @@ jobs: rust-version: [ # 1.72.0, # current stable # beta, - nightly-2023-09-10 + nightly-2023-11-26 ] steps: - uses: actions/checkout@v4 diff --git a/muxers/mplex/src/io.rs b/muxers/mplex/src/io.rs index 753294a7845..50fc0fc1d3f 100644 --- a/muxers/mplex/src/io.rs +++ b/muxers/mplex/src/io.rs @@ -224,7 +224,7 @@ where // yield to give the current task a chance to read // from the respective substreams. if num_buffered == self.config.max_buffer_len { - cx.waker().clone().wake(); + cx.waker().wake_by_ref(); return Poll::Pending; } @@ -456,7 +456,7 @@ where // next frame for `id`, yield to give the current task // a chance to read from the other substream(s). if num_buffered == self.config.max_buffer_len { - cx.waker().clone().wake(); + cx.waker().wake_by_ref(); return Poll::Pending; } @@ -663,7 +663,7 @@ where connection=%self.id, "No task to read from blocked stream. Waking current task." ); - cx.waker().clone().wake(); + cx.waker().wake_by_ref(); } else if let Some(id) = stream_id { // We woke some other task, but are still interested in // reading `Data` frames from the current stream when unblocked. diff --git a/protocols/relay/src/behaviour/rate_limiter.rs b/protocols/relay/src/behaviour/rate_limiter.rs index a4a127e1253..9c4f67d04a8 100644 --- a/protocols/relay/src/behaviour/rate_limiter.rs +++ b/protocols/relay/src/behaviour/rate_limiter.rs @@ -124,7 +124,7 @@ impl GenericRateLimiter { // Note when used with a high number of buckets: This loop refills all the to-be-refilled // buckets at once, thus potentially delaying the parent call to `try_next`. loop { - match self.refill_schedule.get(0) { + match self.refill_schedule.front() { // Only continue if (a) there is a bucket and (b) the bucket has not already been // refilled recently. Some((last_refill, _)) if now.duration_since(*last_refill) >= self.interval => {}