Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a take method which takes a mutable reference #100

Merged
merged 1 commit into from
May 13, 2020

Commits on May 5, 2020

  1. [once_cell] add a take method

    I use `OnceCell` extensively in my code to cache lazily computed data on
    structs. Sometimes, I mutate the data -- in which case I have to invalidate
    those caches.
    
    This is of course possible to do by oneself, but it's slightly non-obvious
    that the "once" bit of OnceCell only applies in the shared reference context.
    sunshowers committed May 5, 2020
    Configuration menu
    Copy the full SHA
    4d8cbfd View commit details
    Browse the repository at this point in the history