Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You would probably want to use RefCell instead of Cell. It allows you to safely upgrade into a &mut using only a constant reference to RefCell, but it dynamically verifies that it's actually safe using ref counting. The ref counting also isn't too expensive since it isn't atomic.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: