diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-10-01 01:09:48 +0200 |
|---|---|---|
| committer | Mara Bos <m-ou.se@m-ou.se> | 2020-10-02 09:47:08 +0200 |
| commit | 4f1353e54f9cdca82487b5e69f94e54047d8ea2f (patch) | |
| tree | 2b62d9bcc75e0842fa5ddd1f1dda52eedd53620d | |
| parent | 2f0386771d17703d8e5ea9abef3359770b51af3f (diff) | |
| download | rust-4f1353e54f9cdca82487b5e69f94e54047d8ea2f.tar.gz rust-4f1353e54f9cdca82487b5e69f94e54047d8ea2f.zip | |
No longer put wasm mutexes in a box.
These mutexes are just an AtomicUsize, so can be moved without problems.
| -rw-r--r-- | library/std/src/sys/wasm/mutex_atomics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/wasm/mutex_atomics.rs b/library/std/src/sys/wasm/mutex_atomics.rs index 5d45efe19c2..2970fcf806c 100644 --- a/library/std/src/sys/wasm/mutex_atomics.rs +++ b/library/std/src/sys/wasm/mutex_atomics.rs @@ -8,7 +8,7 @@ pub struct Mutex { locked: AtomicUsize, } -pub type MovableMutex = Box<Mutex>; +pub type MovableMutex = Mutex; // Mutexes have a pretty simple implementation where they contain an `i32` // internally that is 0 when unlocked and 1 when the mutex is locked. |
