Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions halo2_proofs/src/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use crate::{
};

mod value;
pub(crate) use value::value_dev;
pub use value::Value;

pub mod floor_planner;
Expand Down
7 changes: 7 additions & 0 deletions halo2_proofs/src/circuit/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -701,3 +701,10 @@ impl<F: Field> Value<Assigned<F>> {
}
}
}

/// Utilities for tests and dev tools.
pub mod value_dev {
pub fn unwrap_value<T>(v: super::Value<T>) -> T {
v.inner.unwrap()
}
}
2 changes: 2 additions & 0 deletions halo2_proofs/src/dev.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ mod graph;
#[cfg_attr(docsrs, doc(cfg(feature = "dev-graph")))]
pub use graph::{circuit_dot_graph, layout::CircuitLayout};

pub use crate::circuit::value_dev::unwrap_value;

#[derive(Debug)]
struct Region {
/// The name of the region. Not required to be unique.
Expand Down