let keys: Vec<Key> = vec![key1, key2, key3];
let data = keys
.into_iter()
.map(Data::load)
.collect::<Result<Vec<Data>, _>>?;
Now suppose I convert Data::load to an async fn. Is there any nice way to rewrite the above collect line above to somehing that lets me await a single Result<Vec<Data>, E> ?
Can it be done with the std library (rust 1.48.0), or with the futures crate, or do I have to rewrite it as a loop?