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
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>
|
||||
where
|
||||
F: FnMut(()) -> T,
|
||||
F: FnMut() -> T,
|
||||
{
|
||||
loop {}
|
||||
}
|
||||
|
|
@ -43,13 +43,13 @@ pub trait FnOnce1 {
|
|||
|
||||
impl<T, R> FnOnce1 for T
|
||||
where
|
||||
T: FnOnce(()) -> R,
|
||||
T: FnOnce() -> R,
|
||||
{
|
||||
type Output = R;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let bodies = map(|url| Wrap(Result::Ok(url)));
|
||||
let bodies = map(|| Wrap(Result::Ok(())));
|
||||
|
||||
bodies.for_each(|b| async {
|
||||
match b {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue