diff --git a/parser/src/sema/semantic_analysis.rs b/parser/src/sema/semantic_analysis.rs index 0788a03b..37861305 100644 --- a/parser/src/sema/semantic_analysis.rs +++ b/parser/src/sema/semantic_analysis.rs @@ -1386,7 +1386,7 @@ impl<'a> SemanticAnalysis<'a> { // and we will have already validated the reference let (import_id, module_id) = self.imported.get_key_value(&id).unwrap(); let module = self.library.get(module_id).unwrap(); - if module.evaluators.get(&id.id()).is_none() { + if !module.evaluators.contains_key(&id.id()) { self.invalid_constraint(id.span(), "calls in constraints must be to evaluator functions") .with_secondary_label(import_id.span(), "the function imported here is not an evaluator") .emit(); diff --git a/parser/src/transforms/inlining.rs b/parser/src/transforms/inlining.rs index 5f793b3a..871ee6a6 100644 --- a/parser/src/transforms/inlining.rs +++ b/parser/src/transforms/inlining.rs @@ -115,11 +115,11 @@ impl<'p> Pass for Inlining<'p> { .collect(); // We'll be referencing the trace configuration during inlining, so keep a copy of it - self.trace = program.trace_columns.clone(); + self.trace.clone_from(&program.trace_columns); // Same with the random values - self.random_values = program.random_values.clone(); + self.random_values.clone_from(&program.random_values); // And the public inputs - self.public_inputs = program.public_inputs.clone(); + self.public_inputs.clone_from(&program.public_inputs); // Add all of the local bindings visible in the root module, except for // constants and periodic columns, which by this point have been rewritten