diff options
| author | joboet <jonasboettiger@icloud.com> | 2022-09-03 14:05:28 +0200 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2022-09-03 14:05:28 +0200 |
| commit | 8c37fdf2d702ff1fc805f1bbc5de634e1101a4da (patch) | |
| tree | f8e7a1b7ba19ea1468795fdba6f085bc7e9befc3 /library/std/src/sys/itron | |
| parent | 75b7e52e92c3b00fc891b47f5b2efdff0a2be55a (diff) | |
| download | rust-8c37fdf2d702ff1fc805f1bbc5de634e1101a4da.tar.gz rust-8c37fdf2d702ff1fc805f1bbc5de634e1101a4da.zip | |
std: make `ReentrantMutex` movable and `const`; simplify `Stdout` initialization
Diffstat (limited to 'library/std/src/sys/itron')
| -rw-r--r-- | library/std/src/sys/itron/mutex.rs | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/library/std/src/sys/itron/mutex.rs b/library/std/src/sys/itron/mutex.rs index 715e94c3b3d..085662e6d44 100644 --- a/library/std/src/sys/itron/mutex.rs +++ b/library/std/src/sys/itron/mutex.rs @@ -31,12 +31,6 @@ impl Mutex { Mutex { mtx: SpinIdOnceCell::new() } } - pub unsafe fn init(&mut self) { - // Initialize `self.mtx` eagerly - let id = new_mtx().unwrap_or_else(|e| fail(e, &"acre_mtx")); - unsafe { self.mtx.set_unchecked((id, ())) }; - } - /// Get the inner mutex's ID, which is lazily created. fn raw(&self) -> abi::ID { match self.mtx.get_or_try_init(|| new_mtx().map(|id| (id, ()))) { |
