From 01f2142606ea1599e4dcb0c7e147371dd0f83f44 Mon Sep 17 00:00:00 2001 From: rvcas Date: Fri, 23 Dec 2022 21:53:39 -0500 Subject: [PATCH] fix: the push was in the wrong place --- crates/aiken-project/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/aiken-project/src/lib.rs b/crates/aiken-project/src/lib.rs index ca5ea770..32315e74 100644 --- a/crates/aiken-project/src/lib.rs +++ b/crates/aiken-project/src/lib.rs @@ -187,6 +187,10 @@ where match options.code_gen_mode { CodeGenMode::Build(uplc_dump) => { + if validators.is_empty() { + self.warnings.push(Warning::NoValidators); + } + let programs = self.code_gen(validators)?; self.write_build_outputs(programs, uplc_dump)?; @@ -401,7 +405,7 @@ where Ok(()) } - fn validate_validators(&mut self) -> Result, Error> { + fn validate_validators(&self) -> Result, Error> { let mut errors = Vec::new(); let mut validators = Vec::new(); @@ -464,10 +468,6 @@ where } } - if validators.is_empty() { - self.warnings.push(Warning::NoValidators); - } - if errors.is_empty() { Ok(validators) } else {