mirror of
https://github.com/zama-ai/tfhe-rs.git
synced 2026-01-09 14:47:56 -05:00
fix(c_api): run clippy on high-level-c-api
This commit is contained in:
2
Makefile
2
Makefile
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user