Skip to content

Instantly share code, notes, and snippets.

View stepchowfun's full-sized avatar

Stephan Boyer stepchowfun

View GitHub Profile
fn when<
I: 'static + Send,
F: 'static + Send + Future<Item = I, Error = ()>,
R: 'static + Send,
K: 'static + Send + Fn(&[I]) -> Option<R>,
>(
futures: Vec<F>,
k: K,
) -> Box<dyn Future<Item = R, Error = ()> + Send> {
fn when_rec<