mirror of
https://github.com/Noratrieb/ice-104649.git
synced 2026-01-16 13:25:03 +01:00
simplify
This commit is contained in:
parent
89355810f4
commit
b8279daaf1
1 changed files with 3 additions and 3 deletions
|
|
@ -22,7 +22,7 @@ pub trait Stream {
|
||||||
|
|
||||||
pub fn map<T, F>(f: F) -> Map<F>
|
pub fn map<T, F>(f: F) -> Map<F>
|
||||||
where
|
where
|
||||||
F: FnMut(()) -> T,
|
F: FnMut() -> T,
|
||||||
{
|
{
|
||||||
loop {}
|
loop {}
|
||||||
}
|
}
|
||||||
|
|
@ -43,13 +43,13 @@ pub trait FnOnce1 {
|
||||||
|
|
||||||
impl<T, R> FnOnce1 for T
|
impl<T, R> FnOnce1 for T
|
||||||
where
|
where
|
||||||
T: FnOnce(()) -> R,
|
T: FnOnce() -> R,
|
||||||
{
|
{
|
||||||
type Output = R;
|
type Output = R;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let bodies = map(|url| Wrap(Result::Ok(url)));
|
let bodies = map(|| Wrap(Result::Ok(())));
|
||||||
|
|
||||||
bodies.for_each(|b| async {
|
bodies.for_each(|b| async {
|
||||||
match b {
|
match b {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue