[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230531140346.3707802-1-aliceryhl@google.com>
Date: Wed, 31 May 2023 14:03:46 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: benno.lossin@...ton.me
Cc: alex.gaynor@...il.com, aliceryhl@...gle.com,
bjorn3_gh@...tonmail.com, boqun.feng@...il.com, gary@...yguo.net,
jiangshanlai@...il.com, linux-kernel@...r.kernel.org,
ojeda@...nel.org, patches@...ts.linux.dev,
rust-for-linux@...r.kernel.org, tj@...nel.org, wedsonaf@...il.com
Subject: Re: [PATCH v1 7/7] rust: workqueue: add `try_spawn` helper method
Benno Lossin <benno.lossin@...ton.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
Powered by blists - more mailing lists