summaryrefslogtreecommitdiff
path: root/rust/kernel/workqueue.rs
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2025-10-13 13:32:13 +0100
committerMark Brown <broonie@kernel.org>2025-10-13 13:32:13 +0100
commit4f38da1f027ea2c9f01bb71daa7a299c191b6940 (patch)
tree701d1096f1a3df53ecf2a0231d2ed9a868c9b4b3 /rust/kernel/workqueue.rs
parent18a5f1af596e6ba22cd40ada449063041f3ce6d4 (diff)
parent3a8660878839faadb4f1a6dd72c3179c1df56787 (diff)
spi: Merge up v6.18-rc1
Ensure my CI has a sensible baseline.
Diffstat (limited to 'rust/kernel/workqueue.rs')
-rw-r--r--rust/kernel/workqueue.rs9
1 files changed, 1 insertions, 8 deletions
diff --git a/rust/kernel/workqueue.rs b/rust/kernel/workqueue.rs
index b9343d5bc00f..706e833e9702 100644
--- a/rust/kernel/workqueue.rs
+++ b/rust/kernel/workqueue.rs
@@ -356,18 +356,11 @@ struct ClosureWork<T> {
func: Option<T>,
}
-impl<T> ClosureWork<T> {
- fn project(self: Pin<&mut Self>) -> &mut Option<T> {
- // SAFETY: The `func` field is not structurally pinned.
- unsafe { &mut self.get_unchecked_mut().func }
- }
-}
-
impl<T: FnOnce()> WorkItem for ClosureWork<T> {
type Pointer = Pin<KBox<Self>>;
fn run(mut this: Pin<KBox<Self>>) {
- if let Some(func) = this.as_mut().project().take() {
+ if let Some(func) = this.as_mut().project().func.take() {
(func)()
}
}