diff --git a/vm/src/vm/interpreter.rs b/vm/src/vm/interpreter.rs index 515a93bfb..af28ad87a 100644 --- a/vm/src/vm/interpreter.rs +++ b/vm/src/vm/interpreter.rs @@ -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(self, f: F) -> u8 + pub fn run(self, f: F) -> u8 where - F: FnOnce(&VirtualMachine) -> PyResult, + F: FnOnce(&VirtualMachine) -> PyResult<()>, { let res = self.enter(|vm| f(vm)); self.finalize(res.err())