Messages in this thread | | | Date | Wed, 31 May 2023 14:03:46 +0000 | Subject | Re: [PATCH v1 7/7] rust: workqueue: add `try_spawn` helper method | From | Alice Ryhl <> |
| |
Benno Lossin <benno.lossin@proton.me> writes: >> + /// Tries to spawn the given function or closure as a work item. >> + /// >> + /// This method can fail because it allocates memory to store the work item. >> + pub fn try_spawn<T: 'static + Send + Fn()>(&self, func: T) -> Result { > > Why is this `Fn()` instead of `FnOnce()`?
That's a mistake. Good catch. It will be fixed in the next version.
Alice
| |