Skip to content

Commit 85b066c

Browse files
committed
Update for new Pin API
1 parent cdc0fc4 commit 85b066c

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/bin/async-await.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(alloc)]
22
#![feature(alloc_error_handler)]
33
#![feature(generators, generator_trait)]
4-
#![feature(pin, futures_api)]
4+
#![feature(futures_api)]
55
#![feature(arbitrary_self_types)]
66
#![feature(async_await)]
77
#![no_main]

src/future_mutex.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use spin::Mutex;
22
use core::{
33
future::Future,
4-
pin::{Pin, Unpin},
4+
pin::Pin,
55
mem,
66
};
77
use alloc::task::LocalWaker;

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#![feature(optin_builtin_traits)]
66
#![feature(futures_api)]
77
#![feature(generator_trait)]
8-
#![feature(pin)]
98
#![feature(arbitrary_self_types)]
109
#![feature(drain_filter)]
1110
#![feature(never_type)]

src/task_runtime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ impl Spawn for Executor {
2929

3030
impl LocalSpawn for Executor {
3131
fn spawn_local_obj(&mut self, future: LocalFutureObj<'static, ()>) -> Result<(), SpawnError> {
32-
self.add_task(Box::pinned(future));
32+
self.add_task(Box::pin(future));
3333
Ok(())
3434
}
3535
}
@@ -55,7 +55,7 @@ impl Executor {
5555
where
5656
Fut: Future<Output = !> + 'static,
5757
{
58-
let future_obj = Box::pinned(LocalFutureObj::new(Box::new(future)));
58+
let future_obj = Box::pin(LocalFutureObj::new(Box::new(future)));
5959
self.idle_task = Some(future_obj);
6060
}
6161

0 commit comments

Comments
 (0)