fix(clippy): fix nightly clippy warnings

This commit is contained in:
Mayeul@Zama
2022-06-16 10:05:02 +02:00
committed by mayeul-zama
parent 585c17a163
commit 0b621adfb1
4 changed files with 5 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ use derive_more::{Add, AddAssign};
pub type Weights = ClearTensor;
#[derive(Clone, PartialEq, Debug)]
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct FunctionTable {
pub values: Vec<u64>,
}

View File

@@ -19,7 +19,7 @@ pub(crate) struct ParameterToOperation {
}
#[allow(clippy::module_name_repetitions)]
#[derive(Clone, Copy, PartialEq, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub struct ParameterCount {
pub glwe: usize,
pub br_decomposition: usize,

View File

@@ -16,7 +16,7 @@ mod individual {
pub log2_base: u64,
}
#[derive(Clone, Copy, PartialEq, Debug)]
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
pub struct GlweParameters {
pub log2_polynomial_size: u64,
pub glwe_dimension: u64,

View File

@@ -2,14 +2,14 @@ use std::ops::Mul;
pub fn square<V>(v: V) -> V
where
V: Mul<V> + Mul<Output = V> + Copy,
V: Mul<Output = V> + Copy,
{
v * v
}
pub fn square_ref<V>(v: &V) -> V
where
V: Mul<V> + Mul<Output = V> + Copy,
V: Mul<Output = V> + Copy,
{
square(*v)
}