about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorville-h <ville3.14159@gmail.com>2015-01-04 13:12:17 +0200
committerville-h <ville3.14159@gmail.com>2015-01-04 13:12:17 +0200
commit44b3ddef8df7fa5392ce3608cbe1977f119337ee (patch)
treed50902703d349db7557f6d93a4746c11eb23abb7 /src/libstd
parent98e6d12017da5e323612108c81accb1f437f7137 (diff)
downloadrust-44b3ddef8df7fa5392ce3608cbe1977f119337ee.tar.gz
rust-44b3ddef8df7fa5392ce3608cbe1977f119337ee.zip
fix code referencing RwLockWriteGuard
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sync/mod.rs2
-rw-r--r--src/libstd/sync/rwlock.rs16
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/sync/mod.rs b/src/libstd/sync/mod.rs
index 71ff3c7d172..a2e1eb6c65a 100644
--- a/src/libstd/sync/mod.rs
+++ b/src/libstd/sync/mod.rs
@@ -22,7 +22,7 @@ pub use alloc::arc::{Arc, Weak};
 pub use self::mutex::{Mutex, MutexGuard, StaticMutex};
 pub use self::mutex::MUTEX_INIT;
 pub use self::rwlock::{RwLock, StaticRwLock, RW_LOCK_INIT};
-pub use self::rwlock::{RwLockReadGuard, RWLockWriteGuard};
+pub use self::rwlock::{RwLockReadGuard, RwLockWriteGuard};
 pub use self::condvar::{Condvar, StaticCondvar, CONDVAR_INIT};
 pub use self::once::{Once, ONCE_INIT};
 pub use self::semaphore::{Semaphore, SemaphoreGuard};
diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs
index 6c2def11ce5..bc068d0e637 100644
--- a/src/libstd/sync/rwlock.rs
+++ b/src/libstd/sync/rwlock.rs
@@ -199,9 +199,9 @@ impl<T: Send + Sync> RwLock<T> {
     /// An error will be returned when the lock is acquired.
     #[inline]
     #[stable]
-    pub fn write(&self) -> LockResult<RWLockWriteGuard<T>> {
+    pub fn write(&self) -> LockResult<RwLockWriteGuard<T>> {
         unsafe { self.inner.lock.write() }
-        RWLockWriteGuard::new(&*self.inner, &self.data)
+        RwLockWriteGuard::new(&*self.inner, &self.data)
     }
 
     /// Attempt to lock this rwlock with exclusive write access.
@@ -218,9 +218,9 @@ impl<T: Send + Sync> RwLock<T> {
     /// acquired.
     #[inline]
     #[stable]
-    pub fn try_write(&self) -> TryLockResult<RWLockWriteGuard<T>> {
+    pub fn try_write(&self) -> TryLockResult<RwLockWriteGuard<T>> {
         if unsafe { self.inner.lock.try_read() } {
-            Ok(try!(RWLockWriteGuard::new(&*self.inner, &self.data)))
+            Ok(try!(RwLockWriteGuard::new(&*self.inner, &self.data)))
         } else {
             Err(TryLockError::WouldBlock)
         }
@@ -270,9 +270,9 @@ impl StaticRwLock {
     /// See `RwLock::write`.
     #[inline]
     #[unstable = "may be merged with RwLock in the future"]
-    pub fn write(&'static self) -> LockResult<RWLockWriteGuard<'static, ()>> {
+    pub fn write(&'static self) -> LockResult<RwLockWriteGuard<'static, ()>> {
         unsafe { self.lock.write() }
-        RWLockWriteGuard::new(self, &DUMMY.0)
+        RwLockWriteGuard::new(self, &DUMMY.0)
     }
 
     /// Attempt to lock this rwlock with exclusive write access.
@@ -281,9 +281,9 @@ impl StaticRwLock {
     #[inline]
     #[unstable = "may be merged with RwLock in the future"]
     pub fn try_write(&'static self)
-                     -> TryLockResult<RWLockWriteGuard<'static, ()>> {
+                     -> TryLockResult<RwLockWriteGuard<'static, ()>> {
         if unsafe { self.lock.try_write() } {
-            Ok(try!(RWLockWriteGuard::new(self, &DUMMY.0)))
+            Ok(try!(RwLockWriteGuard::new(self, &DUMMY.0)))
         } else {
             Err(TryLockError::WouldBlock)
         }