-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
{MutexGuard, RwLockReadGuard, RwLockWriteGuard}::map #44189
Comments
It's come up before, but is unsound: #30834 (comment). |
Ah, curses. Thanks for the link; i'll go ahead and close this out then. |
|
Ah I see this was already discussed in #27746 (comment), so nevermind EDIT: That said, |
For any reader stumbling upon this issue, that seems to be the option |
Currently, the RefCell borrow guards have a function called
map
which allows you to transform a borrow of a whole struct to a borrow of one of its fields (or of some related reference with the same lifetime). Would it be possible to add these methods to Mutex and RwLock?The text was updated successfully, but these errors were encountered: