Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions protocols/dcutr/src/handler/relayed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,11 @@ impl Handler {

fn on_listen_upgrade_error(
&mut self,
ListenUpgradeError { error, .. }: ListenUpgradeError<
ListenUpgradeError { .. }: ListenUpgradeError<
(),
<Self as ConnectionHandler>::InboundProtocol,
>,
) {
libp2p_core::util::unreachable(error.into_inner());
}

fn on_dial_upgrade_error(
Expand Down
1 change: 1 addition & 0 deletions protocols/identify/src/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ impl ConnectionHandler for Handler {
ConnectionEvent::DialUpgradeError(DialUpgradeError { error, .. }) => {
self.events.push(ConnectionHandlerEvent::NotifyBehaviour(
Event::IdentificationError(
#[allow(unused)]
error.map_upgrade_err(|e| libp2p_core::util::unreachable(e.into_inner())),
),
));
Expand Down
12 changes: 3 additions & 9 deletions swarm/tests/swarm_derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ fn two_fields() {
let _out_event: <Foo as NetworkBehaviour>::ToSwarm = unimplemented!();
match _out_event {
FooEvent::Ping(ping::Event { .. }) => {}
FooEvent::Identify(event) => {
let _: identify::Event = event;
}
FooEvent::Identify(_event) => {}
}
}
}
Expand All @@ -112,12 +110,8 @@ fn three_fields() {
let _out_event: <Foo as NetworkBehaviour>::ToSwarm = unimplemented!();
match _out_event {
FooEvent::Ping(ping::Event { .. }) => {}
FooEvent::Identify(event) => {
let _: identify::Event = event;
}
FooEvent::Kad(event) => {
let _: libp2p_kad::Event = event;
}
FooEvent::Identify(_event) => {}
FooEvent::Kad(_event) => {}
}
}
}
Expand Down
Loading