You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think I understand - `&mut self` here opens us up to the possibility that the internal state of the singleton can be overwritten.
Are you saying that you want to redesign this so that users aren't able to get themselves into that situation by initializing a contract with a state of None. And then other methods require that the state is Some? Otherwise it will indicate that the contract hasn't been initialized.
Are you saying that you want to redesign this so that users aren't able to get themselves into that situation by initializing a contract with a state of
None
. And then other methods require that the state isSome
? Otherwise it will indicate that the contract hasn't been initialized.That all makes sense to me!
Originally posted by @elizabethengelman in #91 (comment)
The text was updated successfully, but these errors were encountered: