We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2819c90 commit 95e467dCopy full SHA for 95e467d
vm/src/vm/thread.rs
@@ -93,9 +93,9 @@ impl ThreadedVirtualMachine {
93
/// to the parent thread and then `join()` on the `JoinHandle` (or similar), there is a possibility that
94
/// the current thread will panic as `PyObjectRef`'s `Drop` implementation tries to run the `__del__`
95
/// destructor of a python object but finds that it's not in the context of any vm.
96
- pub fn run<F, R>(&self, mut f: F) -> R
+ pub fn run<F, R>(&self, f: F) -> R
97
where
98
- F: FnMut(&VirtualMachine) -> R,
+ F: FnOnce(&VirtualMachine) -> R,
99
{
100
let vm = &self.vm;
101
enter_vm(vm, || f(vm))
0 commit comments