瀏覽代碼

fix rust bindings generation

Andre Weissflog 1 年之前
父節點
當前提交
56cb4a4e15
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      bindgen/gen_rust.py

+ 1 - 1
bindgen/gen_rust.py

@@ -356,7 +356,7 @@ def funcptr_result_c(field_type):
     if res_type == "void":
         return ""
     elif is_prim_type(res_type):
-        return as_rust_prim_type(res_type)
+        return f" -> {as_rust_prim_type(res_type)}"
     elif util.is_const_void_ptr(res_type):
         return " -> *const core::ffi::c_void"
     elif util.is_void_ptr(res_type):