File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -227,11 +227,11 @@ fn raw_waker<W: Wake + Send + Sync + 'static>(waker: Arc<W>) -> RawWaker {
227227/// // we exit, since there are no more tasks remaining on the queue
228228/// return;
229229/// };
230- /// let waker = Waker::noop();
230+ ///
231231/// // cast the Rc<Task> into a `LocalWaker`
232232/// let local_waker: LocalWaker = task.clone().into();
233233/// // Build the context using `ContextBuilder`
234- /// let mut cx = ContextBuilder::from_waker(&waker )
234+ /// let mut cx = ContextBuilder::from_waker(Waker::noop() )
235235/// .local_waker(&local_waker)
236236/// .build();
237237///
Original file line number Diff line number Diff line change @@ -673,14 +673,14 @@ impl LocalWaker {
673673 /// #![feature(noop_waker)]
674674 ///
675675 /// use std::future::Future;
676- /// use std::task::{ContextBuilder, LocalWaker};
676+ /// use std::task::{ContextBuilder, LocalWaker, Waker, Poll };
677677 ///
678- /// let mut cx = task:: ContextBuilder::from_waker(Waker::noop())
678+ /// let mut cx = ContextBuilder::from_waker(Waker::noop())
679679 /// .local_waker(LocalWaker::noop())
680680 /// .build();
681681 ///
682682 /// let mut future = Box::pin(async { 10 });
683- /// assert_eq!(future.as_mut().poll(&mut cx), task:: Poll::Ready(10));
683+ /// assert_eq!(future.as_mut().poll(&mut cx), Poll::Ready(10));
684684 /// ```
685685 #[ inline]
686686 #[ must_use]
You can’t perform that action at this time.
0 commit comments