Amanieu / cstr_core

Implementation of CStr and CString for no_std environments
Apache License 2.0
41 stars 17 forks source link

Don't use Arc if not target_has_atomic = "ptr" #9

Open lights0123 opened 4 years ago

lights0123 commented 4 years ago

Instead of relying on a feature for Arc, just use #[cfg(target_has_atomic = "ptr")], which is what the alloc crate uses anyways. This can be introduced as a non-breaking change as this crate would fail to compile anyways if the arc feature was enabled while the target didn't have support for atomic operations.

Amanieu commented 4 years ago

The problem with target_has_atomic is that it is unstable.