From 3ce68814b6561d093466d4e8b54a8c3739eb6e14 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 9 Aug 2019 12:43:44 +0200 Subject: [PATCH] implement FusedStream for net::Incoming --- src/net/tcp.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/net/tcp.rs b/src/net/tcp.rs index 9d71dcd3..42580c40 100644 --- a/src/net/tcp.rs +++ b/src/net/tcp.rs @@ -6,6 +6,7 @@ use std::task::{Context, Poll}; use cfg_if::cfg_if; use futures::{prelude::*, ready}; +use futures::stream::FusedStream; use crate::net::driver::IoHandle; @@ -667,6 +668,10 @@ impl<'a> Stream for Incoming<'a> { } } +impl<'a> FusedStream for Incoming<'a> { + fn is_terminated(&self) -> bool { false } +} + impl From for TcpStream { /// Converts a `std::net::TcpStream` into its asynchronous equivalent. fn from(stream: net::TcpStream) -> TcpStream {