diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2021-04-30 16:51:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 10:51:54 -0400 |
commit | fc9c7de94b08049dd04c4ca6016586cdac0dd2ac (patch) | |
tree | 939b1dab406e7ea9e077fed6832806016d879065 /test_plugin/src | |
parent | 5ec478b5fa6261e2b2d3c8daed3cba9e780730c7 (diff) |
cleanup(core): replace OpResponse with OpResult (#10434)
Drop the Value/Buffer enum since #10432 allows buffers to be serialized rust => v8
Diffstat (limited to 'test_plugin/src')
-rw-r--r-- | test_plugin/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test_plugin/src/lib.rs b/test_plugin/src/lib.rs index 51ed6d499..71ba698fc 100644 --- a/test_plugin/src/lib.rs +++ b/test_plugin/src/lib.rs @@ -2,7 +2,7 @@ use deno_core::plugin_api::Interface; use deno_core::plugin_api::Op; -use deno_core::plugin_api::OpResponse; +use deno_core::plugin_api::OpResult; use deno_core::plugin_api::ZeroCopyBuf; use futures::future::FutureExt; @@ -25,7 +25,7 @@ fn op_test_sync( } let result = b"test"; let result_box: Box<[u8]> = Box::new(*result); - Op::Sync(OpResponse::Buffer(result_box)) + Op::Sync(OpResult::Ok(result_box.into())) } fn op_test_async( @@ -48,7 +48,7 @@ fn op_test_async( assert!(rx.await.is_ok()); let result = b"test"; let result_box: Box<[u8]> = Box::new(*result); - (0, OpResponse::Buffer(result_box)) + (0, OpResult::Ok(result_box.into())) }; Op::Async(fut.boxed()) |