Merge pull request #1558 from spartucus/main

Refactor code
This commit is contained in:
Ben 2024-03-22 13:00:05 +04:00 committed by GitHub
commit cbfd19edb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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<_>>()