avoid warnings

This commit is contained in:
Rasoul Akhavan Mahdavi
2025-11-05 20:38:20 -05:00
parent 18652da7e0
commit dc2d399602
3 changed files with 12 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ where
res_basek: usize, res_basek: usize,
res: &mut R, res: &mut R,
res_col: usize, res_col: usize,
a_basek: usize, _a_basek: usize,
a: &A, a: &A,
a_col: usize, a_col: usize,
scratch: &mut Scratch<Self>, scratch: &mut Scratch<Self>,
@@ -74,7 +74,7 @@ where
{ {
assert_eq!(res.n(), a.n()); assert_eq!(res.n(), a.n());
assert_eq!( assert_eq!(
res_basek, a_basek, res_basek, _a_basek,
"res_basek != a_basek -> base2k conversion is not supported" "res_basek != a_basek -> base2k conversion is not supported"
) )
} }

View File

@@ -18,26 +18,26 @@ where
{ {
let mut res: VecZnx<&mut [u8]> = res.to_mut(); let mut res: VecZnx<&mut [u8]> = res.to_mut();
let (n_out, n_in) = (res.n(), a[0].to_ref().n()); let (_n_out, _n_in) = (res.n(), a[0].to_ref().n());
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
{ {
assert_eq!(tmp.len(), res.n()); assert_eq!(tmp.len(), res.n());
debug_assert!( debug_assert!(
n_out > n_in, _n_out > _n_in,
"invalid a: output ring degree should be greater" "invalid a: output ring degree should be greater"
); );
a[1..].iter().for_each(|ai| { a[1..].iter().for_each(|ai| {
debug_assert_eq!( debug_assert_eq!(
ai.to_ref().n(), ai.to_ref().n(),
n_in, _n_in,
"invalid input a: all VecZnx must have the same degree" "invalid input a: all VecZnx must have the same degree"
) )
}); });
assert!(n_out.is_multiple_of(n_in)); assert!(_n_out.is_multiple_of(_n_in));
assert_eq!(a.len(), n_out / n_in); assert_eq!(a.len(), _n_out / _n_in);
} }
a.iter().for_each(|ai| { a.iter().for_each(|ai| {

View File

@@ -16,27 +16,27 @@ where
let a: VecZnx<&[u8]> = a.to_ref(); let a: VecZnx<&[u8]> = a.to_ref();
let a_size = a.size(); let a_size = a.size();
let (n_in, n_out) = (a.n(), res[0].to_mut().n()); let (_n_in, _n_out) = (a.n(), res[0].to_mut().n());
#[cfg(debug_assertions)] #[cfg(debug_assertions)]
{ {
assert_eq!(tmp.len(), a.n()); assert_eq!(tmp.len(), a.n());
assert!( assert!(
n_out < n_in, _n_out < _n_in,
"invalid a: output ring degree should be smaller" "invalid a: output ring degree should be smaller"
); );
res[1..].iter_mut().for_each(|bi| { res[1..].iter_mut().for_each(|bi| {
assert_eq!( assert_eq!(
bi.to_mut().n(), bi.to_mut().n(),
n_out, _n_out,
"invalid input a: all VecZnx must have the same degree" "invalid input a: all VecZnx must have the same degree"
) )
}); });
assert!(n_in.is_multiple_of(n_out)); assert!(_n_in.is_multiple_of(_n_out));
assert_eq!(res.len(), n_in / n_out); assert_eq!(res.len(), _n_in / _n_out);
} }
res.iter_mut().enumerate().for_each(|(i, bi)| { res.iter_mut().enumerate().for_each(|(i, bi)| {