From 9e6415df747a1afbd19a6fc36146d76231f81e94 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Mar 2021 10:55:19 +0100 Subject: [PATCH] Update if-watch requirement from 0.1.8 to 0.2.0 (#1979) * Update if-watch requirement from 0.1.8 to 0.2.0 Updates the requirements on [if-watch](https://github.com/dvc94ch/if-watch) to permit the latest version. - [Release notes](https://github.com/dvc94ch/if-watch/releases) - [Commits](https://github.com/dvc94ch/if-watch/commits) Signed-off-by: dependabot[bot] * Update libp2p-tcp. * Update libp2p-tcp version and changelog. Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Roman S. Borschel Co-authored-by: Roman Borschel --- transports/tcp/CHANGELOG.md | 4 ++++ transports/tcp/Cargo.toml | 4 ++-- transports/tcp/src/provider/async_io.rs | 5 ++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/transports/tcp/CHANGELOG.md b/transports/tcp/CHANGELOG.md index 8077ab43..b7d98c14 100644 --- a/transports/tcp/CHANGELOG.md +++ b/transports/tcp/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.27.2 [unreleased] + +- Update to `if-watch-0.2`. + # 0.27.1 [2021-02-15] - Update dependencies. diff --git a/transports/tcp/Cargo.toml b/transports/tcp/Cargo.toml index 1da908ba..5e09b5b0 100644 --- a/transports/tcp/Cargo.toml +++ b/transports/tcp/Cargo.toml @@ -2,7 +2,7 @@ name = "libp2p-tcp" edition = "2018" description = "TCP/IP transport protocol for libp2p" -version = "0.27.1" +version = "0.27.2" authors = ["Parity Technologies "] license = "MIT" repository = "https://github.com/libp2p/rust-libp2p" @@ -13,7 +13,7 @@ categories = ["network-programming", "asynchronous"] async-io-crate = { package = "async-io", version = "1.2.0", optional = true } futures = "0.3.8" futures-timer = "3.0" -if-watch = { version = "0.1.8", optional = true } +if-watch = { version = "0.2.0", optional = true } if-addrs = { version = "0.6.4", optional = true } ipnet = "2.0.0" libc = "0.2.80" diff --git a/transports/tcp/src/provider/async_io.rs b/transports/tcp/src/provider/async_io.rs index c868e196..b4ce74d6 100644 --- a/transports/tcp/src/provider/async_io.rs +++ b/transports/tcp/src/provider/async_io.rs @@ -23,7 +23,6 @@ use super::{Provider, IfEvent, Incoming}; use async_io_crate::Async; use futures::{ future::{BoxFuture, FutureExt}, - prelude::*, }; use std::io; use std::task::{Poll, Context}; @@ -75,9 +74,9 @@ impl Provider for Tcp { } fn poll_interfaces(w: &mut Self::IfWatcher, cx: &mut Context<'_>) -> Poll> { - w.next().map_ok(|e| match e { + w.poll_unpin(cx).map_ok(|e| match e { if_watch::IfEvent::Up(a) => IfEvent::Up(a), if_watch::IfEvent::Down(a) => IfEvent::Down(a), - }).boxed().poll_unpin(cx) + }) } }