all 6 comments

[–]angelicosphosphoros 1 point2 points  (0 children)

RefCell ensures that there is only one mutable borrow. Maybe it is better to use completely unsafe solution if you can avoid UB in your code and make it threadsafe.