diff options
Diffstat (limited to 'src/runtime/runtime.rs')
-rw-r--r-- | src/runtime/runtime.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/runtime/runtime.rs b/src/runtime/runtime.rs index dc91efd..9175ccb 100644 --- a/src/runtime/runtime.rs +++ b/src/runtime/runtime.rs @@ -1,4 +1,4 @@ -use std::{clone::Clone, sync::Arc, thread}; +use std::{sync::Arc, thread}; use crossbeam_channel::{unbounded, Receiver, Sender}; use parking_lot::Mutex; @@ -33,12 +33,6 @@ impl<'runtime> Runtime<'runtime> { } } - /// Get a cloned copy of the `ThreadStatuses`. - #[must_use] - pub(crate) fn statuses(&self) -> ThreadStatuses { - self.thread_statuses.clone() - } - /// Register a new `Threadable`. pub(crate) fn register(&self, threadable: &'runtime mut (dyn Threadable)) { self.threadables.lock().push(threadable); @@ -140,6 +134,14 @@ mod tests { use super::*; + impl Runtime<'_> { + /// Get a cloned copy of the `ThreadStatuses`. + #[must_use] + pub(crate) fn statuses(&self) -> ThreadStatuses { + self.thread_statuses.clone() + } + } + #[test] fn run_thread_finish() { struct Thread; |