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
"error: creating a mutable reference to mutable static is discouraged"? Yeah, we should stick #allow(static_mut_refs)] somewhere. A pull request would be welcome. Thanks much for reporting this.
Activity
BartMassey commentedon Apr 17, 2025
"error: creating a mutable reference to mutable static is discouraged"? Yeah, we should stick
#allow(static_mut_refs)]somewhere. A pull request would be welcome. Thanks much for reporting this.EvansJahja commentedon Apr 18, 2025
I'm a beginner myself and not sure about the best practice.
Would using static (without mut) followed by &raw mut better? I think this is the preferrable syntax and also gives opportunity to explain.
Other would be UnsafeCell or UnsafeSyncCell.
I could try opening a PR and maybe others can point out if my understanding is sound or not
BartMassey commentedon Apr 18, 2025
Honestly, there's nothing wrong with the code as it stands as far as I know. That said, those other possibilities are there too.
Feel free to post some code either in a PR or just attach it here and we'll be happy to look at it.
EvansJahja commentedon Apr 20, 2025
Pushed #390 just now. Any feedback would be appreciated.