A
Size: a a a
A
ph
ph
A
AZ
AZ
AZ
async fn handler() -> Result<(), Bar> {
let x = await someFuture();
if condition(&x) {
await anotherFuture(x);
}
}AZ
fn handler() -> impl Future<Item = (), Error = Bar> + Send {
someFuture()
.and_then(|x| {
if condition(&x) {
Either::A(anotherFuture(x))
} else {
Either::B(future::ok(()))
}
})
}A
AZ
AZ
A
async fn handler() -> Result<(), Bar> {
let x = await someFuture();
if condition(&x) {
await anotherFuture(x);
}
}AZ
let a = a(); let b = b()? ...AZ
AZ
AZ
if a == 10 { return 10; }
...
return 20;
A
ph
ph