diff options
| author | Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca> | 2013-07-22 14:43:30 -0700 |
|---|---|---|
| committer | Steven Stewart-Gallus <sstewartgallus00@mylangara.bc.ca> | 2013-07-27 22:06:29 -0700 |
| commit | 39b3a0561f06b1ea01a12d8fc3372334116a7833 (patch) | |
| tree | f28193aa80d78d16efd25cf319fbd8b604125173 | |
| parent | d0b7515aedcaa161bb206e651a374d7ff27e52a7 (diff) | |
| download | rust-39b3a0561f06b1ea01a12d8fc3372334116a7833.tar.gz rust-39b3a0561f06b1ea01a12d8fc3372334116a7833.zip | |
Fix nits.
| -rw-r--r-- | src/libextra/arc.rs | 17 | ||||
| -rw-r--r-- | src/libstd/unstable/sync.rs | 16 |
2 files changed, 16 insertions, 17 deletions
diff --git a/src/libextra/arc.rs b/src/libextra/arc.rs index ebcfd9770eb..9479e47ed8c 100644 --- a/src/libextra/arc.rs +++ b/src/libextra/arc.rs @@ -182,11 +182,11 @@ impl<T:Send> MutexArc<T> { * Create a mutex-protected Arc with the supplied data and a specified number * of condvars (as sync::Mutex::new_with_condvars). */ - pub fn new_with_condvars(user_data: T, - num_condvars: uint) -> MutexArc<T> { - let data = - MutexArcInner { lock: Mutex::new_with_condvars(num_condvars), - failed: false, data: user_data }; + pub fn new_with_condvars(user_data: T, num_condvars: uint) -> MutexArc<T> { + let data = MutexArcInner { + lock: Mutex::new_with_condvars(num_condvars), + failed: false, data: user_data + }; MutexArc { x: UnsafeAtomicRcBox::new(data) } } @@ -333,9 +333,10 @@ impl<T:Freeze + Send> RWArc<T> { * of condvars (as sync::RWLock::new_with_condvars). */ pub fn new_with_condvars(user_data: T, num_condvars: uint) -> RWArc<T> { - let data = - RWArcInner { lock: RWLock::new_with_condvars(num_condvars), - failed: false, data: user_data }; + let data = RWArcInner { + lock: RWLock::new_with_condvars(num_condvars), + failed: false, data: user_data + }; RWArc { x: UnsafeAtomicRcBox::new(data), } } diff --git a/src/libstd/unstable/sync.rs b/src/libstd/unstable/sync.rs index e83f3a53e4c..b6fc5b1f662 100644 --- a/src/libstd/unstable/sync.rs +++ b/src/libstd/unstable/sync.rs @@ -236,13 +236,11 @@ impl<T> Drop for UnsafeAtomicRcBox<T>{ /****************************************************************************/ -enum RTLittleLock { - // We know nothing about the runtime's representation of the - // little lock so we leave the definition empty. -} +#[allow(non_camel_case_types)] // runtime type +type rust_little_lock = *libc::c_void; pub struct LittleLock { - l: *RTLittleLock, + l: rust_little_lock, } impl Drop for LittleLock { @@ -351,10 +349,10 @@ impl<T:Send> Exclusive<T> { } extern { - fn rust_create_little_lock() -> *RTLittleLock; - fn rust_destroy_little_lock(lock: *RTLittleLock); - fn rust_lock_little_lock(lock: *RTLittleLock); - fn rust_unlock_little_lock(lock: *RTLittleLock); + fn rust_create_little_lock() -> rust_little_lock; + fn rust_destroy_little_lock(lock: rust_little_lock); + fn rust_lock_little_lock(lock: rust_little_lock); + fn rust_unlock_little_lock(lock: rust_little_lock); } #[cfg(test)] |
