diff --git a/__concurrent/async_study/examples/mini_tokio.rs b/__concurrent/async_study/examples/mini_tokio.rs index c542fbf..608d915 100644 --- a/__concurrent/async_study/examples/mini_tokio.rs +++ b/__concurrent/async_study/examples/mini_tokio.rs @@ -35,10 +35,7 @@ impl MiniTokio { } /// Spawn a future onto the mini-tokio instance. - fn spawn(&mut self, future: F) - where - F: Future + Send + 'static, - { + fn spawn(&mut self, future: F) where F: Future + Send + 'static, { self.tasks.push_back(Box::pin(future)); } @@ -62,9 +59,7 @@ struct Delay { impl Future for Delay { type Output = &'static str; - fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) - -> Poll<&'static str> - { + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<&'static str> { if Instant::now() >= self.when { println!("Hello world"); Poll::Ready("done")