mirror of
https://github.com/Noratrieb/ice-104649.git
synced 2026-01-14 12:35:02 +01:00
simplify
This commit is contained in:
parent
b8279daaf1
commit
58cfda5ac1
1 changed files with 1 additions and 8 deletions
|
|
@ -20,13 +20,6 @@ pub trait Stream {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn map<T, F>(f: F) -> Map<F>
|
||||
where
|
||||
F: FnMut() -> T,
|
||||
{
|
||||
loop {}
|
||||
}
|
||||
|
||||
pub struct Map<F>(F);
|
||||
|
||||
impl<F> Stream for Map<F>
|
||||
|
|
@ -49,7 +42,7 @@ where
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let bodies = map(|| Wrap(Result::Ok(())));
|
||||
let bodies = Map(|| Wrap(Result::Ok(())));
|
||||
|
||||
bodies.for_each(|b| async {
|
||||
match b {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue