Get rid of the unsafe get_mut function in the rust cdk

Roman mentions this in the community-conversation, this is an unsafe api, two get_mut calls within the same public-method can corrupt the memory.


thread_local! With the Cell and RefCell is the way to go.

1 Like

There are several examples that are using the unsafe approach. The cycles wallet too.

FYI @roman-kashitsyn