From 1691e06db661a19a5e25276c18cd165386f027bb Mon Sep 17 00:00:00 2001 From: Taylor Cramer Date: Mon, 11 Mar 2019 16:56:00 -0700 Subject: Future-proof the Futures API --- src/liballoc/boxed.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index b2315c6a739..d75a0c298c2 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -81,7 +81,7 @@ use core::ops::{ CoerceUnsized, DispatchFromDyn, Deref, DerefMut, Receiver, Generator, GeneratorState }; use core::ptr::{self, NonNull, Unique}; -use core::task::{Waker, Poll}; +use core::task::{Context, Poll}; use crate::vec::Vec; use crate::raw_vec::RawVec; @@ -914,7 +914,7 @@ impl Generator for Pin> { impl Future for Box { type Output = F::Output; - fn poll(mut self: Pin<&mut Self>, waker: &Waker) -> Poll { - F::poll(Pin::new(&mut *self), waker) + fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + F::poll(Pin::new(&mut *self), cx) } } -- cgit 1.4.1-3-g733a5