Skip to content

Commit

Permalink
rename std::sync::RWLockReadGuard to RwLockReadGuard
Browse files Browse the repository at this point in the history
  • Loading branch information
ville-h committed Jan 4, 2015
1 parent c3dcf9b commit 2dcbdc1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/libstd/sync/rwlock.rs
Expand Up @@ -110,7 +110,7 @@ pub const RW_LOCK_INIT: StaticRwLock = StaticRwLock {
/// dropped.
#[must_use]
#[stable]
pub struct RWLockReadGuard<'a, T: 'a> {
pub struct RwLockReadGuard<'a, T: 'a> {
__lock: &'a StaticRwLock,
__data: &'a UnsafeCell<T>,
__marker: marker::NoSend,
Expand Down Expand Up @@ -301,11 +301,11 @@ impl StaticRwLock {
}
}

impl<'rwlock, T> RWLockReadGuard<'rwlock, T> {
impl<'rwlock, T> RwLockReadGuard<'rwlock, T> {
fn new(lock: &'rwlock StaticRwLock, data: &'rwlock UnsafeCell<T>)
-> LockResult<RWLockReadGuard<'rwlock, T>> {
-> LockResult<RwLockReadGuard<'rwlock, T>> {
poison::map_result(lock.poison.borrow(), |_| {
RWLockReadGuard {
RwLockReadGuard {
__lock: lock,
__data: data,
__marker: marker::NoSend,
Expand All @@ -327,7 +327,7 @@ impl<'rwlock, T> RWLockWriteGuard<'rwlock, T> {
}
}

impl<'rwlock, T> Deref for RWLockReadGuard<'rwlock, T> {
impl<'rwlock, T> Deref for RwLockReadGuard<'rwlock, T> {
type Target = T;

fn deref(&self) -> &T { unsafe { &*self.__data.get() } }
Expand All @@ -344,7 +344,7 @@ impl<'rwlock, T> DerefMut for RWLockWriteGuard<'rwlock, T> {
}

#[unsafe_destructor]
impl<'a, T> Drop for RWLockReadGuard<'a, T> {
impl<'a, T> Drop for RwLockReadGuard<'a, T> {
fn drop(&mut self) {
unsafe { self.__lock.lock.read_unlock(); }
}
Expand Down

0 comments on commit 2dcbdc1

Please sign in to comment.