summaryrefslogtreecommitdiff
path: root/runtime/ops/plugin.rs
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-05-06 19:32:03 +0200
committerGitHub <noreply@github.com>2021-05-06 19:32:03 +0200
commit1e8e44f4c31688ac55100f96bdab27723eb6e575 (patch)
tree820c3b61ded766ecb912eefddaae4894e399555c /runtime/ops/plugin.rs
parentf208e6a26f3c21c25dbfcfe29491a6f5660c999d (diff)
refactor(ops): replace `ZeroCopyBuf` arg by 2nd generic deserializable arg (#10448)
Diffstat (limited to 'runtime/ops/plugin.rs')
-rw-r--r--runtime/ops/plugin.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/ops/plugin.rs b/runtime/ops/plugin.rs
index 6892b66c3..17d39405f 100644
--- a/runtime/ops/plugin.rs
+++ b/runtime/ops/plugin.rs
@@ -104,9 +104,10 @@ impl<'a> plugin_api::Interface for PluginInterface<'a> {
dispatch_op_fn: plugin_api::DispatchOpFn,
) -> OpId {
let plugin_lib = self.plugin_lib.clone();
- let plugin_op_fn: Box<OpFn> = Box::new(move |state_rc, _payload, buf| {
+ let plugin_op_fn: Box<OpFn> = Box::new(move |state_rc, payload| {
let mut state = state_rc.borrow_mut();
let mut interface = PluginInterface::new(&mut state, &plugin_lib);
+ let (_, buf): ((), Option<ZeroCopyBuf>) = payload.deserialize().unwrap();
let op = dispatch_op_fn(&mut interface, buf);
match op {
sync_op @ Op::Sync(..) => sync_op,