box mutex to get a movable mutex

the commit avoid an alignement issue in Mutex implementation
This commit is contained in:
Stefan Lankes 2020-10-13 23:25:42 +02:00
parent 77d98316f4
commit bf268fe928
No known key found for this signature in database
GPG Key ID: 28578EBB789EF62B

View File

@ -155,7 +155,7 @@ pub struct Mutex {
inner: Spinlock<MutexInner>,
}
pub type MovableMutex = Mutex;
pub type MovableMutex = Box<Mutex>;
unsafe impl Send for Mutex {}
unsafe impl Sync for Mutex {}