Skip to content

Commit

Permalink
just use core/alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
eagr authored and mirromutth committed Dec 22, 2023
1 parent e88414d commit 6eeec89
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 35 deletions.
10 changes: 0 additions & 10 deletions latches/src/futex/mod.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
#[cfg(feature = "std")]
use std::{
fmt, hint,
sync::atomic::{
AtomicU32,
Ordering::{Acquire, Relaxed, Release},
},
};

#[cfg(not(feature = "std"))]
use core::{
fmt, hint,
sync::atomic::{
Expand Down
14 changes: 3 additions & 11 deletions latches/src/sync/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
#[cfg(feature = "std")]
use std::{
fmt, hint,
sync::atomic::{
AtomicUsize,
Ordering::{Acquire, Relaxed, Release},
},
time::{Duration, Instant},
};

#[cfg(not(feature = "std"))]
use core::{
fmt, hint,
sync::atomic::{
Expand All @@ -17,6 +6,9 @@ use core::{
},
};

#[cfg(feature = "std")]
use std::time::{Duration, Instant};

#[cfg(all(not(feature = "std"), not(feature = "atomic-wait")))]
compile_error!("`sync` requires `std` or `atomic-wait` feature for Condvar");

Expand Down
14 changes: 0 additions & 14 deletions latches/src/task/mod.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
#[cfg(feature = "std")]
use std::{
fmt,
future::Future,
hint,
pin::Pin,
sync::atomic::{
AtomicUsize,
Ordering::{Acquire, Relaxed, Release},
},
task::{Context, Poll},
};

#[cfg(not(feature = "std"))]
use core::{
fmt,
future::Future,
Expand Down

0 comments on commit 6eeec89

Please sign in to comment.