Skip to content

Commit

Permalink
Move assignment implementation into own file
Browse files Browse the repository at this point in the history
  • Loading branch information
Mason Liang committed Nov 6, 2023
1 parent f1bce41 commit f73694b
Show file tree
Hide file tree
Showing 4 changed files with 674 additions and 537 deletions.
8 changes: 4 additions & 4 deletions src/assignment_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use halo2_proofs::{
};
use itertools::Itertools;
use rayon::prelude::*;
use std::collections::{BTreeMap, BTreeSet, HashMap};
use std::collections::BTreeMap;

#[derive(Clone, Default)]
pub struct AssignmentMap<F: FieldExt>(BTreeMap<usize, Vec<(Column, Value<F>)>>);
Expand All @@ -34,10 +34,10 @@ impl<F: FieldExt> AssignmentMap<F> {
Self(y)
}

pub fn to_vec(self) -> Vec<impl FnMut(Region<'_, F>) -> Result<(), Error>> {
pub fn into_vec(self) -> Vec<impl FnMut(Region<'_, F>) -> Result<(), Error>> {
self.0
.into_iter()
.map(|(_offset, column_assignments)| {
.into_values()
.map(|column_assignments| {
move |mut region: Region<'_, F>| {
for (column, value) in column_assignments.iter() {
match *column {
Expand Down
Loading

0 comments on commit f73694b

Please sign in to comment.