Skip to content

Commit 3f6dfaf

Browse files
author
Stjepan Glavina
authored
Merge pull request #4 from matklad/fused-incoming
implement FusedStream for net::Incoming
2 parents 3f4a56a + 3ce6881 commit 3f6dfaf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/net/tcp.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ use std::task::{Context, Poll};
66

77
use cfg_if::cfg_if;
88
use futures::{prelude::*, ready};
9+
use futures::stream::FusedStream;
910

1011
use crate::net::driver::IoHandle;
1112

@@ -667,6 +668,10 @@ impl<'a> Stream for Incoming<'a> {
667668
}
668669
}
669670

671+
impl<'a> FusedStream for Incoming<'a> {
672+
fn is_terminated(&self) -> bool { false }
673+
}
674+
670675
impl From<net::TcpStream> for TcpStream {
671676
/// Converts a `std::net::TcpStream` into its asynchronous equivalent.
672677
fn from(stream: net::TcpStream) -> TcpStream {

0 commit comments

Comments
 (0)