Skip to content

Commit b1f1dd4

Browse files
committed
f impl future even in no-std, cause why not
1 parent 051b732 commit b1f1dd4

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lightning/src/util/wakers.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ use sync::{Condvar, Mutex};
2121
#[cfg(any(test, feature = "std"))]
2222
use std::time::Instant;
2323

24-
#[cfg(feature = "std")]
25-
use std::future::Future as StdFuture;
26-
#[cfg(feature = "std")]
27-
use std::task::{Context, Poll};
28-
#[cfg(feature = "std")]
29-
use std::pin::Pin;
24+
use core::future::Future as StdFuture;
25+
use core::task::{Context, Poll};
26+
use core::pin::Pin;
3027

3128
/// Used to signal to one of many waiters that the condition they're waiting on has happened.
3229
pub(crate) struct Notifier {
@@ -184,7 +181,6 @@ mod std_future {
184181
}
185182
}
186183

187-
#[cfg(feature = "std")]
188184
/// (C-not exported) as Rust Futures aren't usable in language bindings.
189185
impl<'a> StdFuture for Future {
190186
type Output = ();
@@ -207,7 +203,6 @@ mod tests {
207203
use core::sync::atomic::{AtomicBool, Ordering};
208204
use core::future::Future as FutureTrait;
209205
use core::task::{Context, Poll, RawWaker, RawWakerVTable, Waker};
210-
use core::pin::Pin;
211206

212207
#[cfg(feature = "std")]
213208
#[test]

0 commit comments

Comments
 (0)