relax Send requirement on some drier stream extensions
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
d8311a5ff6
commit
ce6e5e48de
4 changed files with 11 additions and 11 deletions
|
@ -10,7 +10,7 @@ pub trait TryExpect<'a, Item> {
|
||||||
|
|
||||||
impl<'a, T, Item> TryExpect<'a, Item> for T
|
impl<'a, T, Item> TryExpect<'a, Item> for T
|
||||||
where
|
where
|
||||||
T: Stream<Item = Result<Item>> + TryStream + Send + 'a,
|
T: Stream<Item = Result<Item>> + Send + TryStream + 'a,
|
||||||
Item: 'a,
|
Item: 'a,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
|
|
|
@ -16,7 +16,7 @@ use futures::{
|
||||||
/// This interface is not necessarily complete; feel free to add as-needed.
|
/// This interface is not necessarily complete; feel free to add as-needed.
|
||||||
pub trait ReadyExt<Item>
|
pub trait ReadyExt<Item>
|
||||||
where
|
where
|
||||||
Self: Stream<Item = Item> + Send + Sized,
|
Self: Stream<Item = Item> + Sized,
|
||||||
{
|
{
|
||||||
fn ready_all<F>(self, f: F) -> All<Self, Ready<bool>, impl FnMut(Item) -> Ready<bool>>
|
fn ready_all<F>(self, f: F) -> All<Self, Ready<bool>, impl FnMut(Item) -> Ready<bool>>
|
||||||
where
|
where
|
||||||
|
@ -93,7 +93,7 @@ where
|
||||||
|
|
||||||
impl<Item, S> ReadyExt<Item> for S
|
impl<Item, S> ReadyExt<Item> for S
|
||||||
where
|
where
|
||||||
S: Stream<Item = Item> + Send + Sized,
|
S: Stream<Item = Item> + Sized,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn ready_all<F>(self, f: F) -> All<Self, Ready<bool>, impl FnMut(Item) -> Ready<bool>>
|
fn ready_all<F>(self, f: F) -> All<Self, Ready<bool>, impl FnMut(Item) -> Ready<bool>>
|
||||||
|
|
|
@ -13,8 +13,8 @@ use crate::Result;
|
||||||
/// This interface is not necessarily complete; feel free to add as-needed.
|
/// This interface is not necessarily complete; feel free to add as-needed.
|
||||||
pub trait TryReadyExt<T, E, S>
|
pub trait TryReadyExt<T, E, S>
|
||||||
where
|
where
|
||||||
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + Send + ?Sized,
|
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + ?Sized,
|
||||||
Self: TryStream + Send + Sized,
|
Self: TryStream + Sized,
|
||||||
{
|
{
|
||||||
fn ready_and_then<U, F>(
|
fn ready_and_then<U, F>(
|
||||||
self,
|
self,
|
||||||
|
@ -67,8 +67,8 @@ where
|
||||||
|
|
||||||
impl<T, E, S> TryReadyExt<T, E, S> for S
|
impl<T, E, S> TryReadyExt<T, E, S> for S
|
||||||
where
|
where
|
||||||
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + Send + ?Sized,
|
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + ?Sized,
|
||||||
Self: TryStream + Send + Sized,
|
Self: TryStream + Sized,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn ready_and_then<U, F>(
|
fn ready_and_then<U, F>(
|
||||||
|
|
|
@ -8,8 +8,8 @@ use crate::Result;
|
||||||
/// TryStreamTools
|
/// TryStreamTools
|
||||||
pub trait TryTools<T, E, S>
|
pub trait TryTools<T, E, S>
|
||||||
where
|
where
|
||||||
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + Send + ?Sized,
|
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + ?Sized,
|
||||||
Self: TryStream + Send + Sized,
|
Self: TryStream + Sized,
|
||||||
{
|
{
|
||||||
fn try_take(
|
fn try_take(
|
||||||
self,
|
self,
|
||||||
|
@ -23,8 +23,8 @@ where
|
||||||
|
|
||||||
impl<T, E, S> TryTools<T, E, S> for S
|
impl<T, E, S> TryTools<T, E, S> for S
|
||||||
where
|
where
|
||||||
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + Send + ?Sized,
|
S: TryStream<Ok = T, Error = E, Item = Result<T, E>> + ?Sized,
|
||||||
Self: TryStream + Send + Sized,
|
Self: TryStream + Sized,
|
||||||
{
|
{
|
||||||
#[inline]
|
#[inline]
|
||||||
fn try_take(
|
fn try_take(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue