lol no futures

This commit is contained in:
nora 2022-11-20 21:50:54 +01:00
parent 08a9431055
commit 78ad7b4e50
No known key found for this signature in database

View file

@ -28,7 +28,6 @@ mod fut {
pub trait Stream { pub trait Stream {
type Item; type Item;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>;
fn map<T, F>(self, f: F) -> Map<Self, F> fn map<T, F>(self, f: F) -> Map<Self, F>
where where
@ -74,10 +73,6 @@ mod fut {
I: Iterator, I: Iterator,
{ {
type Item = I::Item; type Item = I::Item;
fn poll_next(mut self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Option<I::Item>> {
loop {}
}
} }
pub struct Map<St, F> { pub struct Map<St, F> {
@ -85,18 +80,6 @@ mod fut {
f: F, f: F,
} }
impl<St, F> Stream for Map<St, F>
where
St: Stream,
F: FnMut(St::Item),
{
type Item = F::Output;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
loop {}
}
}
pub trait FnOnce1<A> { pub trait FnOnce1<A> {
type Output; type Output;
fn call_once(self, arg: A) -> Self::Output; fn call_once(self, arg: A) -> Self::Output;
@ -118,10 +101,6 @@ mod fut {
F: FnOnce1<St::Item>, F: FnOnce1<St::Item>,
{ {
type Item = F::Output; type Item = F::Output;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
loop {}
}
} }
pub struct ForEach<St, Fut, F> { pub struct ForEach<St, Fut, F> {
@ -156,10 +135,6 @@ mod fut {
St::Item: Future, St::Item: Future,
{ {
type Item = <St::Item as Future>::Output; type Item = <St::Item as Future>::Output;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> {
loop {}
}
} }
} }