Skip to content

Commit d608d08

Browse files
authored
Some alloc-related cleanup (#130)
* Remove duplicate extern crate alloc * Clean up imports in future module
1 parent 077e1c1 commit d608d08

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

src/future.rs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,26 @@
1515
//! # });
1616
//! ```
1717
18-
#[cfg(all(not(feature = "std"), feature = "alloc"))]
19-
extern crate alloc;
20-
2118
#[doc(no_inline)]
2219
pub use core::future::{pending, ready, Future, Pending, Ready};
2320

2421
use core::fmt;
2522
use core::pin::Pin;
23+
use core::task::{Context, Poll};
2624

27-
use pin_project_lite::pin_project;
25+
#[cfg(feature = "alloc")]
26+
use alloc::boxed::Box;
2827

2928
#[cfg(feature = "std")]
3029
use std::{
3130
any::Any,
32-
boxed::Box,
3331
panic::{catch_unwind, AssertUnwindSafe, UnwindSafe},
3432
thread_local,
3533
};
3634

3735
#[cfg(feature = "race")]
3836
use fastrand::Rng;
39-
40-
#[cfg(all(not(feature = "std"), feature = "alloc"))]
41-
use alloc::boxed::Box;
42-
use core::task::{Context, Poll};
37+
use pin_project_lite::pin_project;
4338

4439
/// Blocks the current thread on a future.
4540
///

0 commit comments

Comments
 (0)