Yeah. And static mut is pretty much almost always unneeded, since there is a safe way to do this, with interior mutability. (I'm coming from the future, but there are apis like OnceLock, LazyLock, etc)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Did you tried to use
thread_local!
instead ofstatic mut
?Nope, I'll look into it though. Thanks!
Yeah. And
static mut
is pretty much almost always unneeded, since there is a safe way to do this, with interior mutability. (I'm coming from the future, but there are apis like OnceLock, LazyLock, etc)