From 387ccce95f753dfe7cdbfb93626d6bbd63434b5f Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Tue, 5 Nov 2019 13:54:52 +0100 Subject: [PATCH] Remove using void to bypass ICE --- protocols/identify/Cargo.toml | 1 - protocols/identify/src/handler.rs | 3 +-- protocols/identify/src/identify.rs | 3 +-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/protocols/identify/Cargo.toml b/protocols/identify/Cargo.toml index 4b0b4238d88..aff7daf9174 100644 --- a/protocols/identify/Cargo.toml +++ b/protocols/identify/Cargo.toml @@ -22,7 +22,6 @@ tokio-codec = "0.1" tokio-io = "0.1.0" wasm-timer = "0.1" unsigned-varint = { version = "0.2.1", features = ["codec"] } -void = "1.0" [dev-dependencies] libp2p-mplex = { version = "0.12.0", path = "../../muxers/mplex" } diff --git a/protocols/identify/src/handler.rs b/protocols/identify/src/handler.rs index 8e984bc79e5..54664ae70c0 100644 --- a/protocols/identify/src/handler.rs +++ b/protocols/identify/src/handler.rs @@ -36,7 +36,6 @@ use smallvec::SmallVec; use std::{io, marker::PhantomData, time::Duration}; use tokio_io::{AsyncRead, AsyncWrite}; use wasm_timer::{Delay, Instant}; -use void::Void; /// Delay between the moment we connect and the first time we identify. const DELAY_TO_FIRST_ID: Duration = Duration::from_millis(500); @@ -95,7 +94,7 @@ impl ProtocolsHandler for IdentifyHandler where TSubstream: AsyncRead + AsyncWrite, { - type InEvent = Void; + type InEvent = (); type OutEvent = IdentifyHandlerEvent; type Error = wasm_timer::Error; type Substream = TSubstream; diff --git a/protocols/identify/src/identify.rs b/protocols/identify/src/identify.rs index 699c365aa13..90666250561 100644 --- a/protocols/identify/src/identify.rs +++ b/protocols/identify/src/identify.rs @@ -37,7 +37,6 @@ use libp2p_swarm::{ }; use std::{collections::HashMap, collections::VecDeque, io}; use tokio_io::{AsyncRead, AsyncWrite}; -use void::Void; /// Network behaviour that automatically identifies nodes periodically, returns information /// about them, and answers identify queries from other nodes. @@ -53,7 +52,7 @@ pub struct Identify { /// Pending replies to send. pending_replies: VecDeque>, /// Pending events to be emitted when polled. - events: VecDeque>, + events: VecDeque>, } /// A pending reply to an inbound identification request.