fix(c_api): run clippy on high-level-c-api

This commit is contained in:
Mayeul@Zama
2024-03-19 11:48:35 +01:00
committed by mayeul-zama
parent 06af752bfc
commit 48309ff773
2 changed files with 3 additions and 3 deletions

View File

@@ -252,7 +252,7 @@ clippy: install_rs_check_toolchain
.PHONY: clippy_c_api # Run clippy lints enabling the boolean, shortint and the C API
clippy_c_api: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api \
--features=$(TARGET_ARCH_FEATURE),boolean-c-api,shortint-c-api,high-level-c-api \
-p $(TFHE_SPEC) -- --no-deps -D warnings
.PHONY: clippy_js_wasm_api # Run clippy lints enabling the boolean, shortint, integer and the js wasm API

View File

@@ -93,7 +93,7 @@ pub unsafe extern "C" fn tfhe_threading_context_run(
unsafe impl Send for TheUserEnsuresTheFuncIsThreadSafe {}
impl TheUserEnsuresTheFuncIsThreadSafe {
fn execute(&mut self, data: TheUserEnsuresDataIsThreadSafe) -> c_int {
fn execute(&mut self, data: &TheUserEnsuresDataIsThreadSafe) -> c_int {
(self.0)(data.0)
}
}
@@ -106,7 +106,7 @@ pub unsafe extern "C" fn tfhe_threading_context_run(
let panic_result = catch_panic(|| {
let context = get_mut_checked(context).unwrap();
result = context.pool.install(move || func.execute(data));
result = context.pool.install(move || func.execute(&data));
});
if panic_result != 0 {