Skip to content

Commit 2e5366d

Browse files
Update posts/2023-10-05-Rust-1.73.0.md
Co-authored-by: Josh Stone <[email protected]>
1 parent 0c7b66a commit 2e5366d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

posts/2023-10-05-Rust-1.73.0.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ right: "🐟"</code></pre></div>
5656

5757
### Thread local initialization
5858

59-
As proposed in [RFC 3184](https://github.com/rust-lang/rfcs/blob/master/text/3184-thread-local-cell-methods.md), `LocalKey<Cell<T>>` and `LocalKey<RefCell<T>>` can now be directly manipulated with `get()`, `set()`, `take()`, and `replace()` methods without jumping through a `with(|inner| ...)` closure which is necessary for general `LocalKey` work. `LocalKey<T>` is the type of `thread_local!` statics.
59+
As proposed in [RFC 3184](https://github.com/rust-lang/rfcs/blob/master/text/3184-thread-local-cell-methods.md), `LocalKey<Cell<T>>` and `LocalKey<RefCell<T>>` can now be directly manipulated with `get()`, `set()`, `take()`, and `replace()` methods, rather than jumping through a `with(|inner| ...)` closure as needed for general `LocalKey` work. `LocalKey<T>` is the type of `thread_local!` statics.
6060

6161
The new methods make common code more concise and avoid running the extra initialization code for the default value specified in `thread_local!` for new threads.
6262

0 commit comments

Comments
 (0)