mirror of
https://github.com/embassy-rs/embassy.git
synced 2025-09-28 04:40:39 +00:00
fix missing sync bounds
This commit is contained in:
parent
905aed45f9
commit
051c63fea2
@ -31,7 +31,12 @@ union Data<T, F> {
|
||||
f: ManuallyDrop<F>,
|
||||
}
|
||||
|
||||
unsafe impl<T, F> Sync for LazyLock<T, F> {}
|
||||
unsafe impl<T, F> Sync for LazyLock<T, F>
|
||||
where
|
||||
T: Sync,
|
||||
F: Sync,
|
||||
{
|
||||
}
|
||||
|
||||
impl<T, F: FnOnce() -> T> LazyLock<T, F> {
|
||||
/// Create a new uninitialized `StaticLock`.
|
||||
|
@ -42,7 +42,7 @@ pub struct OnceLock<T> {
|
||||
data: Cell<MaybeUninit<T>>,
|
||||
}
|
||||
|
||||
unsafe impl<T> Sync for OnceLock<T> {}
|
||||
unsafe impl<T> Sync for OnceLock<T> where T: Sync {}
|
||||
|
||||
impl<T> OnceLock<T> {
|
||||
/// Create a new uninitialized `OnceLock`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user