fix: the push was in the wrong place

This commit is contained in:
rvcas 2022-12-23 21:53:39 -05:00 committed by Lucas
parent cbaf629645
commit 01f2142606
1 changed files with 5 additions and 5 deletions

View File

@ -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<Vec<(PathBuf, String, TypedFunction)>, Error> {
fn validate_validators(&self) -> Result<Vec<(PathBuf, String, TypedFunction)>, 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 {