matklad / once_cell

Rust library for single assignment cells and lazy statics without macros
Apache License 2.0
1.87k stars 109 forks source link

Lazy force_mut? #113

Closed camsteffen closed 2 years ago

camsteffen commented 4 years ago

I see that DerefMut was added to Lazy. Should there also be force_mut then?

matklad commented 4 years ago

Yeah, we probably should add this here and to the std

danielSanchezQ commented 2 years ago

What is the state of this? I just realised I would need a get_mut_or_init. To get a &mut after initialisation.

matklad commented 2 years ago

waiting for someone to submit a PR with implementaiton, docs & tests :)

danielSanchezQ commented 2 years ago

waiting for someone to submit a PR with implementaiton, docs & tests :)

Count me in then! Would need some guidance probably. But expect a PR soon 😄

matklad commented 2 years ago

This exists now