From 219374bb14b4c1d9c8ddbaabc42885269dfe03a8 Mon Sep 17 00:00:00 2001 From: "Mayeul@Zama" <69792125+mayeul-zama@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:19:38 +0100 Subject: [PATCH] chore: fix clippy lints after toolchain update --- tfhe-zk-pok/src/proofs/pke.rs | 3 +-- tfhe-zk-pok/src/proofs/pke_v2.rs | 3 +-- .../compressed_modulus_switched_multi_bit_lwe_ciphertext.rs | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tfhe-zk-pok/src/proofs/pke.rs b/tfhe-zk-pok/src/proofs/pke.rs index 86659445f3..6bc91087bb 100644 --- a/tfhe-zk-pok/src/proofs/pke.rs +++ b/tfhe-zk-pok/src/proofs/pke.rs @@ -223,8 +223,7 @@ impl Proof { c_hat.validate_projective() && c_y.validate_projective() && pi.validate_projective() - && compute_load_proof_fields.as_ref().map_or( - true, + && compute_load_proof_fields.as_ref().is_none_or( |&ComputeLoadProofFields { c_hat_t, c_h, diff --git a/tfhe-zk-pok/src/proofs/pke_v2.rs b/tfhe-zk-pok/src/proofs/pke_v2.rs index b018c85111..51f2038583 100644 --- a/tfhe-zk-pok/src/proofs/pke_v2.rs +++ b/tfhe-zk-pok/src/proofs/pke_v2.rs @@ -289,8 +289,7 @@ impl Proof { && C_hat_t.validate_projective() && pi.validate_projective() && pi_kzg.validate_projective() - && compute_load_proof_fields.as_ref().map_or( - true, + && compute_load_proof_fields.as_ref().is_none_or( |&ComputeLoadProofFields { C_hat_h3, C_hat_w }| { C_hat_h3.validate_projective() && C_hat_w.validate_projective() }, diff --git a/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs b/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs index 9414be7615..6df1c9ae5a 100644 --- a/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs +++ b/tfhe/src/core_crypto/entities/compressed_modulus_switched_multi_bit_lwe_ciphertext.rs @@ -421,7 +421,7 @@ impl + CastFrom> ParameterSetCo && packed_mask.is_conformant(&lwe_dim) && packed_diffs .as_ref() - .map_or(true, |packed_diffs| packed_diffs.is_conformant(&lwe_dim)) + .is_none_or(|packed_diffs| packed_diffs.is_conformant(&lwe_dim)) && *lwe_dimension == lwe_ct_parameters.lwe_dim && lwe_ct_parameters.ct_modulus.is_power_of_two() && match lwe_ct_parameters.ms_decompression_method {