From c9bfc35c4b7cc045e1907d917aa001abd9874072 Mon Sep 17 00:00:00 2001 From: hanabi1224 Date: Mon, 26 Aug 2024 17:21:53 +0800 Subject: [PATCH] fix: parameterless function with non-unit return does not compile --- rust2go-common/src/raw_file.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust2go-common/src/raw_file.rs b/rust2go-common/src/raw_file.rs index ff5f096..c7518ab 100644 --- a/rust2go-common/src/raw_file.rs +++ b/rust2go-common/src/raw_file.rs @@ -1488,7 +1488,7 @@ inline void {fn_name}_cb(const void *f_ptr, {c_resp_type} resp, const void *slot let (_buf, #func_param_names) = ::rust2go::ToRef::calc_ref(#ref_marks #func_param_names); )* #[allow(clippy::useless_transmute)] - unsafe { #path_prefix #c_func_name(#(::std::mem::transmute(#func_param_names)),*, &slot as *const _ as *const () as *mut _, Self::#callback_name as *const () as *mut _) }; + unsafe { #path_prefix #c_func_name(#(::std::mem::transmute(#func_param_names),)* &slot as *const _ as *const () as *mut _, Self::#callback_name as *const () as *mut _) }; slot.take().unwrap() } });