Skip to content

Commit

Permalink
Don"t let Interpreter::run silently ignore result value
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Aug 6, 2024
1 parent 6092c07 commit 08e7ec9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vm/src/vm/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ impl Interpreter {
///
/// See [`finalize`] for the finalization steps.
/// See also [`enter`] for pure function call to obtain Python exception.
pub fn run<F, R>(self, f: F) -> u8
pub fn run<F>(self, f: F) -> u8
where
F: FnOnce(&VirtualMachine) -> PyResult<R>,
F: FnOnce(&VirtualMachine) -> PyResult<()>,
{
let res = self.enter(|vm| f(vm));
self.finalize(res.err())
Expand Down

0 comments on commit 08e7ec9

Please sign in to comment.