From 60aa11df4c1c4fef9122a025c31819e1cf3e456a Mon Sep 17 00:00:00 2001 From: Josef Reinhard Brandl Date: Mon, 6 Aug 2018 10:22:13 +0200 Subject: Rename Executor trait to Spawn --- src/liballoc/boxed.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 2cf9b13a67a..08db5136d04 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -67,7 +67,7 @@ use core::marker::{Unpin, Unsize}; use core::mem::{self, PinMut}; use core::ops::{CoerceUnsized, Deref, DerefMut, Generator, GeneratorState}; use core::ptr::{self, NonNull, Unique}; -use core::task::{Context, Poll, Executor, SpawnErrorKind, SpawnObjError}; +use core::task::{Context, Poll, Spawn, SpawnErrorKind, SpawnObjError}; use raw_vec::RawVec; use str::from_boxed_utf8_unchecked; @@ -973,11 +973,14 @@ unsafe impl<'a, T, F> UnsafeFutureObj<'a, T> for PinBox } #[unstable(feature = "futures_api", issue = "50547")] -impl Executor for Box - where E: Executor + ?Sized +impl Spawn for Box + where Sp: Spawn + ?Sized { - fn spawn_obj(&mut self, task: FutureObj<'static, ()>) -> Result<(), SpawnObjError> { - (**self).spawn_obj(task) + fn spawn_obj( + &mut self, + future: FutureObj<'static, ()>, + ) -> Result<(), SpawnObjError> { + (**self).spawn_obj(future) } fn status(&self) -> Result<(), SpawnErrorKind> { -- cgit 1.4.1-3-g733a5