Skip to content

Commit a2c2cb9

Browse files
committed
rename std::sync::RWLock to RwLock
1 parent fc2ba13 commit a2c2cb9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/libstd/sync/rwlock.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ use sys_common::rwlock as sys;
5959
/// } // write lock is dropped here
6060
/// ```
6161
#[stable]
62-
pub struct RWLock<T> {
62+
pub struct RwLock<T> {
6363
inner: Box<StaticRWLock>,
6464
data: UnsafeCell<T>,
6565
}
6666

67-
unsafe impl<T:'static+Send> Send for RWLock<T> {}
68-
unsafe impl<T> Sync for RWLock<T> {}
67+
unsafe impl<T:'static+Send> Send for RwLock<T> {}
68+
unsafe impl<T> Sync for RwLock<T> {}
6969

7070
/// Structure representing a statically allocated RWLock.
7171
///
@@ -127,11 +127,11 @@ pub struct RWLockWriteGuard<'a, T: 'a> {
127127
__marker: marker::NoSend,
128128
}
129129

130-
impl<T: Send + Sync> RWLock<T> {
130+
impl<T: Send + Sync> RwLock<T> {
131131
/// Creates a new instance of an RWLock which is unlocked and read to go.
132132
#[stable]
133-
pub fn new(t: T) -> RWLock<T> {
134-
RWLock { inner: box RWLOCK_INIT, data: UnsafeCell::new(t) }
133+
pub fn new(t: T) -> RwLock<T> {
134+
RwLock { inner: box RWLOCK_INIT, data: UnsafeCell::new(t) }
135135
}
136136

137137
/// Locks this rwlock with shared read access, blocking the current thread
@@ -228,7 +228,7 @@ impl<T: Send + Sync> RWLock<T> {
228228
}
229229

230230
#[unsafe_destructor]
231-
impl<T> Drop for RWLock<T> {
231+
impl<T> Drop for RwLock<T> {
232232
fn drop(&mut self) {
233233
unsafe { self.inner.lock.destroy() }
234234
}

0 commit comments

Comments
 (0)