Skip to content

Commit 3954cfd

Browse files
authored
chore: fix clippy lints
will address the intra doc links issue on a subsequent PR, the remaining [issue](https://github.com/libp2p/rust-libp2p/actions/runs/19040315461/job/54375441096?pr=6195#step:6:760) seems like a bug, opened rust-lang/rust-clippy#16023. Pull-Request: #6195.
1 parent 0c25004 commit 3954cfd

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

protocols/dcutr/src/handler/relayed.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,8 @@ impl Handler {
148148

149149
fn on_listen_upgrade_error(
150150
&mut self,
151-
ListenUpgradeError { error, .. }: ListenUpgradeError<
152-
(),
153-
<Self as ConnectionHandler>::InboundProtocol,
154-
>,
151+
_: ListenUpgradeError<(), <Self as ConnectionHandler>::InboundProtocol>,
155152
) {
156-
libp2p_core::util::unreachable(error.into_inner());
157153
}
158154

159155
fn on_dial_upgrade_error(

protocols/identify/src/handler.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,7 @@ impl ConnectionHandler for Handler {
430430
ConnectionEvent::DialUpgradeError(DialUpgradeError { error, .. }) => {
431431
self.events.push(ConnectionHandlerEvent::NotifyBehaviour(
432432
Event::IdentificationError(
433+
#[allow(unused)]
433434
error.map_upgrade_err(|e| libp2p_core::util::unreachable(e.into_inner())),
434435
),
435436
));

swarm/tests/swarm_derive.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ fn two_fields() {
8484
let _out_event: <Foo as NetworkBehaviour>::ToSwarm = unimplemented!();
8585
match _out_event {
8686
FooEvent::Ping(ping::Event { .. }) => {}
87-
FooEvent::Identify(event) => {
88-
let _: identify::Event = event;
87+
FooEvent::Identify(_event) => {
88+
let _: identify::Event = _event;
8989
}
9090
}
9191
}
@@ -112,11 +112,11 @@ fn three_fields() {
112112
let _out_event: <Foo as NetworkBehaviour>::ToSwarm = unimplemented!();
113113
match _out_event {
114114
FooEvent::Ping(ping::Event { .. }) => {}
115-
FooEvent::Identify(event) => {
116-
let _: identify::Event = event;
115+
FooEvent::Identify(_event) => {
116+
let _: identify::Event = _event;
117117
}
118-
FooEvent::Kad(event) => {
119-
let _: libp2p_kad::Event = event;
118+
FooEvent::Kad(_event) => {
119+
let _: libp2p_kad::Event = _event;
120120
}
121121
}
122122
}

0 commit comments

Comments
 (0)