@ -2,7 +2,7 @@ use std::pin::Pin;
use crate::prelude::*;
use crate::stream::{FromStream, IntoStream};
use crate::utils::identity;
use std::convert::identity;
impl<T, V> FromStream<Option<T>> for Option<V>
where
@ -33,11 +33,7 @@ where
.collect()
.await;
if found_none {
None
} else {
Some(out)
}
if found_none { None } else { Some(out) }
})
use crate::stream::{Product, Stream};
impl<T, U> Product<Option<U>> for Option<T>
@ -57,11 +57,7 @@ where
)
use crate::stream::{Stream, Sum};
impl<T, U> Sum<Option<U>> for Option<T>
@ -52,11 +52,7 @@ where
@ -52,14 +52,6 @@ pub fn random(n: u32) -> u32 {
/// Returns given argument without changes.
#[allow(dead_code)]
#[doc(hidden)]
#[inline(always)]
pub(crate) fn identity<T>(arg: T) -> T {
arg
/// Add additional context to errors
pub(crate) trait Context {
fn context(self, message: impl Fn() -> String) -> Self;