diff --git a/dog/src/handler.rs b/dog/src/handler.rs index b134fff..c3df428 100644 --- a/dog/src/handler.rs +++ b/dog/src/handler.rs @@ -413,7 +413,7 @@ impl ConnectionHandler for Handler { ConnectionEvent::DialUpgradeError(DialUpgradeError { error: StreamUpgradeError::Apply(e), .. - }) => void::unreachable(e), + }) => libp2p_core::util::unreachable(e), ConnectionEvent::DialUpgradeError(DialUpgradeError { error: StreamUpgradeError::NegotiationFailed, .. diff --git a/dog/src/protocol.rs b/dog/src/protocol.rs index e6702a6..f3c4a7f 100644 --- a/dog/src/protocol.rs +++ b/dog/src/protocol.rs @@ -1,4 +1,4 @@ -use std::{future::Future, iter, pin::Pin}; +use std::{convert::Infallible, future::Future, iter, pin::Pin}; use asynchronous_codec::{Decoder, Encoder, Framed}; use futures::future; @@ -9,7 +9,6 @@ use libp2p::{ InboundUpgrade, OutboundUpgrade, PeerId, StreamProtocol, }; use quick_protobuf::Writer; -use void::Void; use crate::{ config::ValidationMode, @@ -59,7 +58,7 @@ where TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static, { type Output = Framed; - type Error = Void; // TODO: change to Infallible with next rust-libp2p release + type Error = Infallible; type Future = Pin> + Send>>; fn upgrade_inbound(self, socket: TSocket, _: Self::Info) -> Self::Future { @@ -75,7 +74,7 @@ where TSocket: AsyncRead + AsyncWrite + Send + Unpin + 'static, { type Output = Framed; - type Error = Void; // TODO: change to Infallible with next rust-libp2p release + type Error = Infallible; type Future = Pin> + Send>>; fn upgrade_outbound(self, socket: TSocket, _: Self::Info) -> Self::Future {