File tree 2 files changed +5
-5
lines changed
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 {
227
227
/// // we exit, since there are no more tasks remaining on the queue
228
228
/// return;
229
229
/// };
230
- /// let waker = Waker::noop();
230
+ ///
231
231
/// // cast the Rc<Task> into a `LocalWaker`
232
232
/// let local_waker: LocalWaker = task.clone().into();
233
233
/// // Build the context using `ContextBuilder`
234
- /// let mut cx = ContextBuilder::from_waker(&waker )
234
+ /// let mut cx = ContextBuilder::from_waker(Waker::noop() )
235
235
/// .local_waker(&local_waker)
236
236
/// .build();
237
237
///
Original file line number Diff line number Diff line change @@ -673,14 +673,14 @@ impl LocalWaker {
673
673
/// #![feature(noop_waker)]
674
674
///
675
675
/// use std::future::Future;
676
- /// use std::task::{ContextBuilder, LocalWaker};
676
+ /// use std::task::{ContextBuilder, LocalWaker, Waker, Poll };
677
677
///
678
- /// let mut cx = task:: ContextBuilder::from_waker(Waker::noop())
678
+ /// let mut cx = ContextBuilder::from_waker(Waker::noop())
679
679
/// .local_waker(LocalWaker::noop())
680
680
/// .build();
681
681
///
682
682
/// 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));
684
684
/// ```
685
685
#[ inline]
686
686
#[ must_use]
You can’t perform that action at this time.
0 commit comments