Toots for bobulous@fosstodon.org account

Written by Bobulous :rust: :codeberg: on 2025-01-25 at 22:48

Woo! Just completed #Satisfactory without nuclear power. And it only took 360 hours. I'm sure everyone can agree that's time well spent.

(Now I'm inevitably going to learn that someone has speedrun the entire thing in three hours flat.)

=> More informations about this toot | View the thread

Written by Bobulous :rust: :codeberg: on 2024-11-18 at 22:37

Is there some way to have a #Rust HashMap find (or create if the key is new) the entry for a given key, then release the reference to that key?

I called entry(key) and held the given Entry, hoping that (lookup now finished) the borrow would be released, but that's not the case.

I'm trying to avoid heap allocation when grabbing map entries that have already been created. (Obivously heap allocation is needed to create a held key in the first place, but after that it seems wasteful.)

[#]RustLang

=> More informations about this toot | View the thread

=> This profile with reblog | Go to bobulous@fosstodon.org account

Proxy Information
Original URL
gemini://mastogem.picasoft.net/profile/109440883266959128
Status Code
Success (20)
Meta
text/gemini
Capsule Response Time
310.845555 milliseconds
Gemini-to-HTML Time
0.484772 milliseconds

This content has been proxied by September (ba2dc).