mirror of
https://github.com/async-rs/async-std.git
synced 2025-02-28 07:09:40 +00:00
implement FusedStream for net::Incoming
This commit is contained in:
parent
3f4a56abdc
commit
3ce68814b6
1 changed files with 5 additions and 0 deletions
|
@ -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<net::TcpStream> for TcpStream {
|
||||
/// Converts a `std::net::TcpStream` into its asynchronous equivalent.
|
||||
fn from(stream: net::TcpStream) -> TcpStream {
|
||||
|
|
Loading…
Reference in a new issue