Willendless / willendless.github.io

My personal blog.
https://willendless.github.io
2 stars 1 forks source link

rust中实现全局可变结构 | JR's Blog #50

Open Willendless opened 3 years ago

Willendless commented 3 years ago

https://willendless.github.io/%E7%B3%BB%E7%BB%9F%E7%BC%96%E7%A8%8B/2021/02/25/rust%E4%B8%AD%E5%AE%9E%E7%8E%B0%E5%85%A8%E5%B1%80%E5%8F%AF%E5%8F%98%E7%BB%93%E6%9E%84/

rust不允许同时存在对同一个值的多个可变引用。那么如何实现全局可变结构呢?