mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-12-25 19:22:01 +03:00
Change to circuit_name in internal variables
This commit is contained in:
parent
c9d3f8615e
commit
88c0feb334
@ -11,17 +11,14 @@ pub struct Circuit {
|
||||
|
||||
impl<'ast> From<AstCircuit<'ast>> for Circuit {
|
||||
fn from(circuit: AstCircuit<'ast>) -> Self {
|
||||
let variable = Identifier::from(circuit.identifier);
|
||||
let circuit_name = Identifier::from(circuit.identifier);
|
||||
let members = circuit
|
||||
.members
|
||||
.into_iter()
|
||||
.map(|member| CircuitMember::from(member))
|
||||
.collect();
|
||||
|
||||
Self {
|
||||
circuit_name: variable,
|
||||
members,
|
||||
}
|
||||
Self { circuit_name, members }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,14 +161,14 @@ impl<'ast> fmt::Display for Expression {
|
||||
|
||||
impl<'ast> From<CircuitInlineExpression<'ast>> for Expression {
|
||||
fn from(expression: CircuitInlineExpression<'ast>) -> Self {
|
||||
let variable = Identifier::from(expression.identifier);
|
||||
let circuit_name = Identifier::from(expression.identifier);
|
||||
let members = expression
|
||||
.members
|
||||
.into_iter()
|
||||
.map(|member| CircuitFieldDefinition::from(member))
|
||||
.collect::<Vec<CircuitFieldDefinition>>();
|
||||
|
||||
Expression::Circuit(variable, members)
|
||||
Expression::Circuit(circuit_name, members)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user