Closed Cyborus04 closed 2 years ago
Creates a OnceCell that is already initialized with the provided value, like
OnceCell
let x = OnceCell::new(); let _ = x.set(/* stuff */);
I have a use case where there's two paths to creating the OnceCell, one where the contents are already known, and one where they're calculated later
I could probably implement this, if that's cool
This is already available as a From impl: https://docs.rs/once_cell/1.8.0/src/once_cell/lib.rs.html#800-806
Might be useful to mention it explicitly somewhere in the docs!
Creates a
OnceCell
that is already initialized with the provided value, likeI have a use case where there's two paths to creating the
OnceCell
, one where the contents are already known, and one where they're calculated laterI could probably implement this, if that's cool