diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-11 07:05:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-11 07:05:43 +0200 |
commit | 29eca72fea4f1e160a8d76d2ebda26e2c48b9658 (patch) | |
tree | be8db9d2253a1f64bda23a01b035932b6dc5d34b /core/runtime.rs | |
parent | 8aa0d5f96ed418e21efb99967f1f6b7fea0dc87f (diff) |
core: avoid async op future reboxing to bundle PromiseId (#10123)
Diffstat (limited to 'core/runtime.rs')
-rw-r--r-- | core/runtime.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/runtime.rs b/core/runtime.rs index 04c6ca1af..28f015fda 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -1506,7 +1506,7 @@ pub mod tests { Mode::Async => { let control: u8 = payload.deserialize().unwrap(); assert_eq!(control, 42); - let resp = OpResponse::Value(Box::new(43)); + let resp = (0, OpResponse::Value(Box::new(43))); Op::Async(Box::pin(futures::future::ready(resp))) } Mode::AsyncUnref => { @@ -1515,7 +1515,7 @@ pub mod tests { let fut = async { // This future never finish. futures::future::pending::<()>().await; - OpResponse::Value(Box::new(43)) + (0, OpResponse::Value(Box::new(43))) }; Op::AsyncUnref(Box::pin(fut)) } @@ -1526,7 +1526,7 @@ pub mod tests { } let resp = OpResponse::Value(Box::new(43)); - Op::Async(Box::pin(futures::future::ready(resp))) + Op::Async(Box::pin(futures::future::ready((0, resp)))) } } } @@ -1970,7 +1970,7 @@ pub mod tests { dispatch_count_.fetch_add(1, Ordering::Relaxed); let control: u8 = payload.deserialize().unwrap(); assert_eq!(control, 42); - let resp = OpResponse::Value(Box::new(43)); + let resp = (0, OpResponse::Value(Box::new(43))); Op::Async(Box::pin(futures::future::ready(resp))) }; |