diff options
Diffstat (limited to 'runtime/ops/plugin.rs')
-rw-r--r-- | runtime/ops/plugin.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/runtime/ops/plugin.rs b/runtime/ops/plugin.rs index e972df046..424b1dca0 100644 --- a/runtime/ops/plugin.rs +++ b/runtime/ops/plugin.rs @@ -126,10 +126,13 @@ impl<'a> plugin_api::Interface for PluginInterface<'a> { _ => unreachable!(), } }; - self - .state - .op_table - .register_op(name, metrics_op(Box::new(plugin_op_fn))) + self.state.op_table.register_op( + name, + metrics_op( + Box::leak(Box::new(name.to_string())), + Box::new(plugin_op_fn), + ), + ) } } |