Re:Rust 1.49.0
by brundolf on Thursday December 31, 2020 @11:15AM
(#25593964)
Here's how you can do global mutable state in Rust:
I agree that this isn't the most ergonomic, but like most unergonomic things in Rust, there are reasons for it being so.
[ Parent
| on HN ]
Re:Rust 1.49.0
by steveklabnik on Thursday December 31, 2020 @11:18AM
(#25593991)
(You'd probably replace the first two lines with "use lazy_static::lazy_static;" in today's Rust, that older style isn't as idiomatic.)