Closed konsumlamm closed 2 years ago
There's no "active" reason for this function not existing, but I think self.get().is_some()
would probably be more clear anyway.
I think
self.get().is_some()
would probably be more clear anyway
How so? I think self.is_initialized()
clarifies the intent better.
Btw, is there a reason get
, get_mut
and into_inner
aren't exposed by Lazy
?
Closing: I don't think this pulls its weight (and Lazy::get now exists)
As far as i can tell, there is currently no
is_initialized
function for theOnceCell
s (and transitively theLazy
types). It could trivially be implemented like this (forOnceCell
):Is there any reason this doesn't exist yet? If not, I could make a PR for it.