Skip to content

Commit

Permalink
[chore] impl AsRef, AsMut for BaseCircuitBuilder to self (#173)
Browse files Browse the repository at this point in the history
chore: impl `AsRef, AsMut` for `BaseCircuitBuilder` to self
  • Loading branch information
jonathanpwang authored Oct 1, 2023
1 parent dff0e63 commit 8a5d469
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions halo2-base/src/gates/circuit/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,15 @@ pub struct RangeStatistics {
/// Total special advice cells that need to be looked up, per phase
pub total_lookup_advice_per_phase: Vec<usize>,
}

impl<F: ScalarField> AsRef<BaseCircuitBuilder<F>> for BaseCircuitBuilder<F> {
fn as_ref(&self) -> &BaseCircuitBuilder<F> {
self
}
}

impl<F: ScalarField> AsMut<BaseCircuitBuilder<F>> for BaseCircuitBuilder<F> {
fn as_mut(&mut self) -> &mut BaseCircuitBuilder<F> {
self
}
}

0 comments on commit 8a5d469

Please sign in to comment.