use alloc imports

This commit is contained in:
Rob Ede 2021-03-29 11:50:31 +01:00
parent 4b2e1b8892
commit fe01601ff3
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
3 changed files with 5 additions and 5 deletions

View File

@ -1,9 +1,7 @@
//! Task-notifying counter. //! Task-notifying counter.
use core::cell::Cell; use alloc::rc::Rc;
use core::task; use core::{cell::Cell, task};
use std::rc::Rc;
use local_waker::LocalWaker; use local_waker::LocalWaker;

View File

@ -3,9 +3,9 @@
use core::{ use core::{
fmt, fmt,
future::Future, future::Future,
pin::Pin,
task::{Context, Poll}, task::{Context, Poll},
}; };
use std::pin::Pin;
/// Create a future driven by the provided function that receives a task context. /// Create a future driven by the provided function that receives a task context.
pub fn poll_fn<F, T>(f: F) -> PollFn<F> pub fn poll_fn<F, T>(f: F) -> PollFn<F>

View File

@ -5,6 +5,8 @@
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
extern crate alloc;
pub mod counter; pub mod counter;
pub mod future; pub mod future;
pub mod timeout; pub mod timeout;