Hacker News new | ask | show | jobs
by kouteiheika 2726 days ago
A tip - you usually don't need lambdas in such cases; this should work:

    foo().map_err(MyError::FooError)?
      .bar().map_err(MyError::BarError)?;
1 comments

Oh, nice! I did not realize tuple constructors implemented `FnOnce`! Thanks for the tip!