futures_micro::prelude

Function zip

Source
pub fn zip<F1, F2>(f1: F1, f2: F2) -> Zip<F1, F2> 
where F1: Future, F2: Future,
Expand description

Zips two futures, waiting for both to complete.

§Examples

use futures_micro::prelude::zip;

let a = async { 1 };
let b = async { 2 };

assert_eq!(zip(a, b).await, (1, 2));