diff --git a/src/gates/exponentiation.rs b/src/gates/exponentiation.rs index 64fe9be0..4aadeedc 100644 --- a/src/gates/exponentiation.rs +++ b/src/gates/exponentiation.rs @@ -1,12 +1,10 @@ -use std::convert::TryInto; use std::marker::PhantomData; -use std::ops::Range; use crate::circuit_builder::CircuitBuilder; use crate::field::extension_field::target::ExtensionTarget; -use crate::field::extension_field::{Extendable, FieldExtension}; +use crate::field::extension_field::Extendable; use crate::field::field::Field; -use crate::gates::gate::{Gate, GateRef}; +use crate::gates::gate::Gate; use crate::generator::{GeneratedValues, SimpleGenerator, WitnessGenerator}; use crate::plonk_common::reduce_with_powers; use crate::target::Target; @@ -24,12 +22,11 @@ pub(crate) struct ExponentiationGate, const D: usize> { } impl, const D: usize> ExponentiationGate { - pub fn new(power_bits: usize) -> GateRef { - let gate = Self { + pub fn new(power_bits: usize) -> Self { + Self { num_power_bits: power_bits, _phantom: PhantomData, - }; - GateRef::new(gate) + } } pub fn wires_base(&self) -> usize { @@ -202,8 +199,7 @@ mod tests { #[test] fn low_degree() { - type F = CrandallField; - test_low_degree(ExponentiationGate::::new(5)); + test_low_degree::(ExponentiationGate::new(5)); } #[test] diff --git a/src/gates/insertion.rs b/src/gates/insertion.rs index 4b75ef44..41e3e6e9 100644 --- a/src/gates/insertion.rs +++ b/src/gates/insertion.rs @@ -6,7 +6,7 @@ use crate::circuit_builder::CircuitBuilder; use crate::field::extension_field::target::ExtensionTarget; use crate::field::extension_field::{Extendable, FieldExtension}; use crate::field::field::Field; -use crate::gates::gate::{Gate, GateRef}; +use crate::gates::gate::Gate; use crate::generator::{GeneratedValues, SimpleGenerator, WitnessGenerator}; use crate::target::Target; use crate::vars::{EvaluationTargets, EvaluationVars, EvaluationVarsBase};