Skip to content

Commit

Permalink
Bump Rust and fix trivial lints
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaseizinger committed Dec 29, 2023
1 parent b6bb02b commit d161d08
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,8 @@ jobs:
fail-fast: false
matrix:
rust-version: [
# 1.72.0, # current stable
# beta,
nightly-2023-09-10
1.75.0, # current stable
beta,
]
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions muxers/mplex/src/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion protocols/relay/src/behaviour/rate_limiter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl<Id: Eq + PartialEq + Hash + Clone> GenericRateLimiter<Id> {
// 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 => {}
Expand Down
1 change: 1 addition & 0 deletions transports/dns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ pub enum Error<TErr> {
/// The underlying transport encountered an error.
Transport(TErr),
/// DNS resolution failed.
#[allow(clippy::enum_variant_names)]
ResolveError(ResolveError),
/// DNS resolution was successful, but the underlying transport refused the resolved address.
MultiaddrNotSupported(Multiaddr),
Expand Down
1 change: 1 addition & 0 deletions transports/noise/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ pub enum Error {
#[error("failed to decode protobuf ")]
InvalidPayload(#[from] DecodeError),
#[error(transparent)]
#[allow(clippy::enum_variant_names)]
SigningError(#[from] libp2p_identity::SigningError),
#[error("Expected WebTransport certhashes ({}) are not a subset of received ones ({})", certhashes_to_string(.0), certhashes_to_string(.1))]
UnknownWebTransportCerthashes(HashSet<Multihash<64>>, HashSet<Multihash<64>>),
Expand Down
1 change: 1 addition & 0 deletions transports/webtransport-websys/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub enum Error {
Noise(#[from] libp2p_noise::Error),

#[error("JavaScript error: {0}")]
#[allow(clippy::enum_variant_names)]
JsError(String),

#[error("JavaScript typecasting failed")]
Expand Down

0 comments on commit d161d08

Please sign in to comment.