spez,

Toot :

🦀 In 1.73.0 (to be released on October 5th), it’ll be easier to use thread_local Cells and RefCells: the set, get, replace, take, and with_borrow[_mut] methods will be directly available on the thread local, removing the need for the usual .with(|_| …) pattern: 1/2

https://media.hachyderm.io/media_attachments/files/110/894/446/438/268/790/original/b522b13331ddfb47.png

The new .set() method can be more efficient than .with(|x| x.set()), because it skips the step where the first call to with initializes the variable. The option to skip the default initializer can be very useful in some situations:

https://media.hachyderm.io/media_attachments/files/110/894/449/685/043/716/original/e5a2399a61e8c7a5.pnghttps://media.hachyderm.io/media_attachments/files/110/894/449/832/289/541/original/93b08589a66fbe09.png

2/2

darcy,
@darcy@sh.itjust.works avatar

spez?

Barbacamanitu,

Lol not a great name choice. Wish I would have thought of it though.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • rust@programming.dev
  • khanakhh
  • magazineikmin
  • mdbf
  • GTA5RPClips
  • everett
  • rosin
  • Youngstown
  • tacticalgear
  • slotface
  • ngwrru68w68
  • kavyap
  • DreamBathrooms
  • thenastyranch
  • tester
  • JUstTest
  • ethstaker
  • cubers
  • osvaldo12
  • cisconetworking
  • Durango
  • InstantRegret
  • normalnudes
  • Leos
  • modclub
  • anitta
  • provamag3
  • megavids
  • lostlight
  • All magazines