refactor code

This commit is contained in:
Bob Niu 2024-03-22 16:22:05 +08:00
parent 54cee24b36
commit 3e89c7c24c
2 changed files with 1 additions and 7 deletions

View File

@ -38,11 +38,7 @@ fn fft_dispatch<F: Field>(
zero_factor: Option<usize>,
root_table: Option<&FftRootTable<F>>,
) {
let computed_root_table = if root_table.is_some() {
None
} else {
Some(fft_root_table(input.len()))
};
let computed_root_table = root_table.is_none().then(|| fft_root_table(input.len()));
let used_root_table = root_table.or(computed_root_table.as_ref()).unwrap();
fft_classic(input, zero_factor.unwrap_or(0), used_root_table);

View File

@ -126,8 +126,6 @@ where
);
// Permutation arguments.
let constraint_degree = stark.constraint_degree();
let lookup_challenges = stark.uses_lookups().then(|| {
if let Some(c) = ctl_challenges {
c.challenges.iter().map(|ch| ch.beta).collect::<Vec<_>>()