mirror of
https://github.com/Noratrieb/ice-104649.git
synced 2026-01-14 20:45:01 +01:00
lol no futures
This commit is contained in:
parent
08a9431055
commit
78ad7b4e50
1 changed files with 0 additions and 25 deletions
25
src/main.rs
25
src/main.rs
|
|
@ -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 {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue