diff options
| author | ville-h <ville3.14159@gmail.com> | 2015-01-03 23:22:09 +0200 |
|---|---|---|
| committer | ville-h <ville3.14159@gmail.com> | 2015-01-03 23:22:09 +0200 |
| commit | a2c2cb942ebb443bfbc864a4606cc2784c850882 (patch) | |
| tree | be03aae62a70cb352602b166986d2963d548359a /src/libstd/sync | |
| parent | fc2ba13939aa9672d886beb06efde7aeda2d5f7f (diff) | |
| download | rust-a2c2cb942ebb443bfbc864a4606cc2784c850882.tar.gz rust-a2c2cb942ebb443bfbc864a4606cc2784c850882.zip | |
rename std::sync::RWLock to RwLock
Diffstat (limited to 'src/libstd/sync')
| -rw-r--r-- | src/libstd/sync/rwlock.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 431aeb9cae9..af102fc7402 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -59,13 +59,13 @@ use sys_common::rwlock as sys; /// } // write lock is dropped here /// ``` #[stable] -pub struct RWLock<T> { +pub struct RwLock<T> { inner: Box<StaticRWLock>, data: UnsafeCell<T>, } -unsafe impl<T:'static+Send> Send for RWLock<T> {} -unsafe impl<T> Sync for RWLock<T> {} +unsafe impl<T:'static+Send> Send for RwLock<T> {} +unsafe impl<T> Sync for RwLock<T> {} /// Structure representing a statically allocated RWLock. /// @@ -127,11 +127,11 @@ pub struct RWLockWriteGuard<'a, T: 'a> { __marker: marker::NoSend, } -impl<T: Send + Sync> RWLock<T> { +impl<T: Send + Sync> RwLock<T> { /// Creates a new instance of an RWLock which is unlocked and read to go. #[stable] - pub fn new(t: T) -> RWLock<T> { - RWLock { inner: box RWLOCK_INIT, data: UnsafeCell::new(t) } + pub fn new(t: T) -> RwLock<T> { + RwLock { inner: box RWLOCK_INIT, data: UnsafeCell::new(t) } } /// Locks this rwlock with shared read access, blocking the current thread @@ -228,7 +228,7 @@ impl<T: Send + Sync> RWLock<T> { } #[unsafe_destructor] -impl<T> Drop for RWLock<T> { +impl<T> Drop for RwLock<T> { fn drop(&mut self) { unsafe { self.inner.lock.destroy() } } |
