Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
stargazing-dino committed Jan 5, 2025
1 parent be00a17 commit 1ae69a1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/func/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@ impl<T> SendSync for T {}

/// Immutable reference-counted container.
#[cfg(not(feature = "sync"))]
// TODO: Further audit no_std compatibility
// When building with no_std + sync features, explicit imports from alloc
// are needed despite using no_std_compat. This fixed compilation errors
// around missing trait implementations for some users.
pub use alloc::rc::Rc as Shared;
/// Immutable reference-counted container.
#[cfg(feature = "sync")]
// TODO: Further audit no_std compatibility
// While no_std_compat should map std::sync::Arc to alloc::sync::Arc,
// there appear to be cases where this mapping fails.
pub use alloc::sync::Arc as Shared;

/// Synchronized shared object.
Expand Down

0 comments on commit 1ae69a1

Please sign in to comment.