matklad / once_cell

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

Feature request: impl Clone #4

Closed starkat99 closed 6 years ago

starkat99 commented 6 years ago

impl Clone for OnceCell where T: Clone

Finding myself in need of Cloning. I'm guessing Lazy can't be, but OnceCell would be helpful?

matklad commented 6 years ago

unsync::OnceCell is now Clone

mmstick commented 5 years ago

Would it be reasonable to support this for sync::OnceCell as well?

mmstick commented 5 years ago

I guess Arc<OnceCell> achieves this.