]> git.lizzy.rs Git - rust.git/commit
Add guard map methods for transforming guards to contain sub-borrows.
authorJonathan Reem <jonathan.reem@gmail.com>
Tue, 12 Jan 2016 03:10:02 +0000 (19:10 -0800)
committerJonathan Reem <jonathan.reem@gmail.com>
Sat, 30 Jan 2016 01:00:04 +0000 (17:00 -0800)
commita4343e99c0e38bcb31386d48a6682e3a1896a0cc
tree0e08bb658f37588a5c74612b16336916e7c3f40c
parent074f49a350f22b6f33890cd105b2ebe2c790ee3c
Add guard map methods for transforming guards to contain sub-borrows.

This is very useful when the lock is synchronizing access to a data
structure and you would like to return or store guards which contain
references to data inside the data structure instead of the data structure
itself.
src/libstd/sync/mutex.rs
src/libstd/sync/rwlock.rs