diff --git a/msim/src/sim/task.rs b/msim/src/sim/task.rs index cb25783..e80a155 100644 --- a/msim/src/sim/task.rs +++ b/msim/src/sim/task.rs @@ -632,7 +632,7 @@ impl JoinHandle { /// Return an AbortHandle corresponding for the task. pub fn abort_handle(&self) -> AbortHandle { - let inner = ErasablePtr::erase(Box::new(self.inner.clone())); + let inner = ErasablePtr::erase(self.inner.clone()); let id = self.id; AbortHandle { id, inner } }