From bb53135ed87ec063c9238e1b7de8cf3b44535685 Mon Sep 17 00:00:00 2001 From: Aaron O'Mullan Date: Tue, 15 Mar 2022 23:43:17 +0100 Subject: cleanup(core): OpPair => OpDecl (#13952) --- ops/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'ops') diff --git a/ops/lib.rs b/ops/lib.rs index 126da368a..718922c59 100644 --- a/ops/lib.rs +++ b/ops/lib.rs @@ -66,13 +66,16 @@ pub fn op(_attr: TokenStream, item: TokenStream) -> TokenStream { stringify!(#name) } - pub fn v8_cb #generics () -> #core::v8::FunctionCallback #where_clause { + pub fn v8_fn_ptr #generics () -> #core::v8::FunctionCallback #where_clause { use #core::v8::MapFnTo; Self::v8_func::<#type_params>.map_fn_to() } - pub fn decl #generics () -> (&'static str, #core::v8::FunctionCallback) #where_clause { - (Self::name(), Self::v8_cb::<#type_params>()) + pub fn decl #generics () -> #core::OpDecl #where_clause { + #core::OpDecl { + name: Self::name(), + v8_fn_ptr: Self::v8_fn_ptr::<#type_params>(), + } } #[inline] -- cgit v1.2.3