From 3e89c7c24ce0e01131c4af1379190dd0357158b8 Mon Sep 17 00:00:00 2001 From: Bob Niu Date: Fri, 22 Mar 2024 16:22:05 +0800 Subject: [PATCH] refactor code --- field/src/fft.rs | 6 +----- starky/src/prover.rs | 2 -- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/field/src/fft.rs b/field/src/fft.rs index 0a0b5dd8..5fe29b31 100644 --- a/field/src/fft.rs +++ b/field/src/fft.rs @@ -38,11 +38,7 @@ fn fft_dispatch( zero_factor: Option, root_table: Option<&FftRootTable>, ) { - 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); diff --git a/starky/src/prover.rs b/starky/src/prover.rs index c7b77b93..29b72521 100644 --- a/starky/src/prover.rs +++ b/starky/src/prover.rs @@ -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::>()