Skip to content

Commit

Permalink
chore: Don't produce output value
Browse files Browse the repository at this point in the history
The runner will only execute compiled Simfony programs, which produce
the unit output. There is no reason to return this output.
  • Loading branch information
uncomputable committed Sep 16, 2024
1 parent 900c7df commit 114b710
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl Runner {
}
}

pub fn run(&mut self) -> Result<Value, ErrorKind> {
pub fn run(&mut self) -> Result<(), ErrorKind> {
while let Some(task) = self.tasks.pop() {
match task {
Task::Execute(expression) => {
Expand Down Expand Up @@ -231,7 +231,8 @@ impl Runner {

debug_assert!(self.input.is_empty());
debug_assert_eq!(self.output.len(), 1);
Ok(self.output.pop().unwrap())
debug_assert!(self.output.pop().unwrap().is_unit());
Ok(())
}

/// Try to return an error with Simfony debug information included.
Expand Down

0 comments on commit 114b710

Please sign in to comment.