Skip to content

Commit 21d2c46

Browse files
authored
chore: fix clippy(beta) error
https://github.com/libp2p/rust-libp2p/actions/runs/21696896538/job/62568845676?pr=6264 > error: the `Err`-variant returned from this closure is very large > Error: --> swarm/src/connection/pool.rs:692:41 ref: [result_large_err](https://rust-lang.github.io/rust-clippy/beta/index.html#result_large_err) Allowed `result_large_err` since the `Result` returned by the closure is [consumed immediately](https://github.com/libp2p/rust-libp2p/blob/3c8c1e30bc81f8297469369789195a2015f3537d/swarm/src/connection/pool.rs#L742-L756), so the large error variant is never propagated across stack frames. Pull-Request: #6266.
1 parent 5bad680 commit 21d2c46

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

swarm/src/connection/pool.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,9 @@ where
689689
),
690690
};
691691

692+
// The `Result` is consumed immediately below so the large error variant is
693+
// never propagated across stack frames.
694+
#[allow(clippy::result_large_err)]
692695
let check_peer_id = || {
693696
if let Some(peer) = expected_peer_id {
694697
if peer != obtained_peer_id {

0 commit comments

Comments
 (0)