diff --git a/code/ch02-03/object/src/task/thread.rs b/code/ch02-03/object/src/task/thread.rs index 20edb89..a8be3c4 100644 --- a/code/ch02-03/object/src/task/thread.rs +++ b/code/ch02-03/object/src/task/thread.rs @@ -10,8 +10,8 @@ use { pin::Pin, task::{Context, Poll, Waker}, }, - trapframe::{UserContext}, spin::Mutex, + trapframe::UserContext, }; pub use self::thread_state::*; @@ -258,7 +258,6 @@ impl Task for Thread { } } - /// A handle to current thread. /// /// This is a wrapper of [`Thread`] that provides additional methods for the thread runner. @@ -397,9 +396,9 @@ pub struct ThreadInfo { mod tests { use super::job::Job; use super::*; + use core::time::Duration; use kernel_hal::timer_now; use kernel_hal::GeneralRegs; - use core::time::Duration; #[test] fn create() { @@ -469,7 +468,6 @@ mod tests { assert_eq!(thread.state(), ThreadState::Dead); } - #[test] fn info() { let root_job = Job::root();