Skip to content

Commit

Permalink
chore: address clippy beta lints
Browse files Browse the repository at this point in the history
Pull-Request: libp2p#5515.
  • Loading branch information
jxs authored Jul 30, 2024
1 parent 41e2d5d commit 06b5847
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions hole-punching-tests/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ impl RedisClient {

tracing::debug!("Pushing {key}={value} to redis");

self.inner.rpush(key, value).await?;

Ok(())
self.inner.rpush(key, value).await.map_err(Into::into)
}

async fn pop<V>(&mut self, key: &str) -> Result<V>
Expand Down
3 changes: 1 addition & 2 deletions interop-tests/src/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ pub(crate) mod native {

pub(crate) async fn rpush(&self, key: &str, value: String) -> Result<()> {
let mut conn = self.0.get_async_connection().await?;
conn.rpush(key, value).await?;
Ok(())
conn.rpush(key, value).await.map_err(Into::into)
}
}
}
Expand Down
3 changes: 1 addition & 2 deletions protocols/ping/src/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@ pub const PROTOCOL_NAME: StreamProtocol = StreamProtocol::new("/ipfs/ping/1.0.0"
/// > Nagle's algorithm, delayed acks and similar configuration options
/// > which can affect latencies especially on otherwise low-volume
/// > connections.
#[derive(Default, Debug, Copy, Clone)]
pub(crate) struct Ping;
const PING_SIZE: usize = 32;

/// Sends a ping and waits for the pong.
Expand Down

0 comments on commit 06b5847

Please sign in to comment.