Skip to content

Commit 95e467d

Browse files
committed
Use FnOnce
1 parent 2819c90 commit 95e467d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vm/src/vm/thread.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ impl ThreadedVirtualMachine {
9393
/// to the parent thread and then `join()` on the `JoinHandle` (or similar), there is a possibility that
9494
/// the current thread will panic as `PyObjectRef`'s `Drop` implementation tries to run the `__del__`
9595
/// 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
96+
pub fn run<F, R>(&self, f: F) -> R
9797
where
98-
F: FnMut(&VirtualMachine) -> R,
98+
F: FnOnce(&VirtualMachine) -> R,
9999
{
100100
let vm = &self.vm;
101101
enter_vm(vm, || f(vm))

0 commit comments

Comments
 (0)