Skip to content

Commit 6cb826f

Browse files
committed
remove last usages of pry!()
1 parent 894e66c commit 6cb826f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

capnp-rpc/src/rpc.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3161,12 +3161,11 @@ impl<VatId> ClientHook for Client<VatId> {
31613161
Ok(request) => {
31623162
let ::capnp::capability::RemotePromise { promise, .. } = request.send();
31633163

3164-
let promise = promise.and_then(move |response| {
3165-
pry!(pry!(results.get()).set_as(pry!(response.get())));
3166-
Promise::ok(())
3167-
});
3168-
3169-
Promise::from_future(promise)
3164+
Promise::from_future(async move {
3165+
let response = promise.await?;
3166+
results.get()?.set_as(response.get()?)?;
3167+
Ok(())
3168+
})
31703169
}
31713170
}
31723171
// TODO implement this in terms of direct tail call.

0 commit comments

Comments
 (0)