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

I take it there's no way of tying the lifetime of the MutexGuard to the lifetime of the .access return, so that you don't have to have this intermediate step?


The version presented in the blog post is simplified. In actual Rust, you don't need to write .access, as it is elided using the Deref trait. So in practice there isn't an intermediate step.




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

Search: