Hacker News new | past | comments | ask | show | jobs | submit login

You can do:

  pub fn try_join<A: Future<Output = Result<AR, E>>, B: Future<Output = Result<BR, E>>, AR, BR, E>(a: A, b: B) -> impl Future<Output = Result<(AR, BR), E>> {



Rust truly is a better C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: