diff --git a/kernel/src/thread/mod.rs b/kernel/src/thread/mod.rs index ca56a1e0d..dd2e0df07 100644 --- a/kernel/src/thread/mod.rs +++ b/kernel/src/thread/mod.rs @@ -157,10 +157,7 @@ impl Thread { } /// Returns the associated data. - /// - /// The return type must be borrowed box, otherwise the `downcast_ref` will fail. - #[allow(clippy::borrowed_box)] - pub fn data(&self) -> &Box { - &self.data + pub fn data(&self) -> &(dyn Send + Sync + Any) { + &*self.data } }