chore(wasm): fix clippy lints

This commit is contained in:
Arthur Meyre
2022-11-15 15:58:47 +01:00
parent 45fb747c20
commit 0891ea5551
5 changed files with 16 additions and 1 deletions

View File

@@ -67,3 +67,10 @@ jobs:
- name: Build Release c_api
run: |
make build_c_api
- name: wasm API Clippy
run: |
make clippy_js_wasm_api
# The wasm build check is a bit annoying to set-up here and is done during the tests in
# aws_tfhe_tests.yml

View File

@@ -75,6 +75,12 @@ clippy_cuda: install_rs_check_toolchain
--features=$(TARGET_ARCH_FEATURE),cuda,boolean-c-api,shortint-c-api \
-p tfhe -- --no-deps -D warnings
.PHONY: clippy_js_wasm_api # Run clippy lints enabling the boolean, shortint and the js wasm API
clippy_js_wasm_api: install_rs_check_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy \
--features=boolean-client-js-wasm-api,shortint-client-js-wasm-api \
-p tfhe -- --no-deps -D warnings
.PHONY: gen_key_cache # Run the script to generate keys and cache them for shortint tests
gen_key_cache: install_rs_build_toolchain
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_BUILD_TOOLCHAIN) run --release \

View File

@@ -57,6 +57,7 @@ impl Boolean {
}
#[wasm_bindgen]
#[allow(clippy::too_many_arguments)]
pub fn new_boolean_parameters(
lwe_dimension: usize,
glwe_dimension: usize,

View File

@@ -79,6 +79,7 @@ impl Shortint {
}
#[wasm_bindgen]
#[allow(clippy::too_many_arguments)]
pub fn new_shortint_parameters(
lwe_dimension: usize,
glwe_dimension: usize,

View File

@@ -1,5 +1,5 @@
use crate::core_crypto::commons::math::random::Seeder;
#[cfg(target_os = "macos")]
#[cfg(all(target_os = "macos", not(feature = "__wasm_api")))]
use concrete_csprng::seeders::AppleSecureEnclaveSeeder;
#[cfg(feature = "seeder_x86_64_rdseed")]
use concrete_csprng::seeders::RdseedSeeder;