From 0aa2d7c9c16c514e47bbd07ca90552f9159901ef Mon Sep 17 00:00:00 2001 From: Aapo Alasuutari Date: Mon, 8 May 2023 10:57:38 +0300 Subject: [PATCH] perf(ext/ffi): Use `Box<[NativeType]>` in CallbackInfo parameters (#19032) --- ext/ffi/callback.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ffi/callback.rs b/ext/ffi/callback.rs index d1abd0c704..2d2cf491be 100644 --- a/ext/ffi/callback.rs +++ b/ext/ffi/callback.rs @@ -96,7 +96,7 @@ struct CallbackInfo { pub async_work_sender: mpsc::UnboundedSender, pub callback: NonNull, pub context: NonNull, - pub parameters: Vec, + pub parameters: Box<[NativeType]>, pub result: NativeType, pub thread_id: u32, pub waker: Option, @@ -578,7 +578,7 @@ where async_work_sender, callback, context, - parameters: args.parameters.clone(), + parameters: args.parameters.clone().into(), result: args.result.clone(), thread_id, waker: None,