plonky2/src/plonk/copy_constraint.rs
Daniel Lubarov 018fb005f8
Move stuff around (#135)
No functional changes here. The biggest change was moving certain files into new directories like `plonk` and `iop` (for things like `Challenger` that could be used in STARKs or other IOPs). I also split a few files, renames, etc, but again nothing functional, so I don't think a careful review is necessary (just a sanity check).
2021-07-29 22:00:29 -07:00

23 lines
448 B
Rust

use crate::iop::target::Target;
/// A named copy constraint.
pub struct CopyConstraint {
pub pair: (Target, Target),
pub name: String,
}
impl From<(Target, Target)> for CopyConstraint {
fn from(pair: (Target, Target)) -> Self {
Self {
pair,
name: String::new(),
}
}
}
impl CopyConstraint {
pub fn new(pair: (Target, Target), name: String) -> Self {
Self { pair, name }
}
}