Skip to content

Commit

Permalink
Conditionally re-export alloc::sync (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagician authored Mar 25, 2024
1 parent 4cee4bc commit e18cd56
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ pub mod error;
#[doc(hidden)]
pub use std::*;

#[cfg(target_has_atomic = "ptr")]
#[doc(hidden)]
pub mod sync {
#[cfg(not(feature = "std"))]
pub use alloc::sync::*;
#[cfg(feature = "std")]
pub use std::sync::*;
}

mod rand_helper;
pub use rand_helper::*;

Expand Down

0 comments on commit e18cd56

Please sign in to comment.