feat(lib): rename unstable-stream feature to stream and enable by default

Closes #2034
This commit is contained in:
Sean McArthur
2019-12-04 16:39:38 -08:00
parent aa66de4f27
commit 0b03b73053
6 changed files with 37 additions and 39 deletions

View File

@@ -6,7 +6,7 @@
//! connections.
//! - Utilities like `poll_fn` to ease creating a custom `Accept`.
#[cfg(feature = "unstable-stream")]
#[cfg(feature = "stream")]
use futures_core::Stream;
use crate::common::{Pin, task::{self, Poll}};
@@ -68,11 +68,11 @@ where
/// Adapt a `Stream` of incoming connections into an `Accept`.
///
/// # Unstable
/// # Optional
///
/// This function requires enabling the `unstable-stream` feature in your
/// This function requires enabling the `stream` feature in your
/// `Cargo.toml`.
#[cfg(feature = "unstable-stream")]
#[cfg(feature = "stream")]
pub fn from_stream<S, IO, E>(stream: S) -> impl Accept<Conn = IO, Error = E>
where
S: Stream<Item = Result<IO, E>>,