diff options
| author | Jakub Wieczorek <jakub@jakub.cc> | 2014-06-06 15:51:42 +0200 |
|---|---|---|
| committer | Jakub Wieczorek <jakub@jakub.cc> | 2014-06-08 13:36:28 +0200 |
| commit | f7d86b2f4ace416a65e84603082c756b8b5dc43e (patch) | |
| tree | 9c47bd9132d7f323bde048e1fe1998c2d5a01692 /src/libsync | |
| parent | 0271224bdae26260ab498f47323997f9edb5879e (diff) | |
| download | rust-f7d86b2f4ace416a65e84603082c756b8b5dc43e.tar.gz rust-f7d86b2f4ace416a65e84603082c756b8b5dc43e.zip | |
Remove the dead code identified by the new lint
Diffstat (limited to 'src/libsync')
| -rw-r--r-- | src/libsync/raw.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsync/raw.rs b/src/libsync/raw.rs index 8fd10cdfa8b..821afeaa1f2 100644 --- a/src/libsync/raw.rs +++ b/src/libsync/raw.rs @@ -355,7 +355,7 @@ pub struct Semaphore { /// dropped, this value will release the resource back to the semaphore. #[must_use] pub struct SemaphoreGuard<'a> { - guard: SemGuard<'a, ()>, + _guard: SemGuard<'a, ()>, } impl Semaphore { @@ -375,7 +375,7 @@ impl Semaphore { /// Acquire a resource of this semaphore, returning an RAII guard which will /// release the resource when dropped. pub fn access<'a>(&'a self) -> SemaphoreGuard<'a> { - SemaphoreGuard { guard: self.sem.access() } + SemaphoreGuard { _guard: self.sem.access() } } } @@ -398,7 +398,7 @@ pub struct Mutex { /// corresponding mutex is also unlocked. #[must_use] pub struct MutexGuard<'a> { - guard: SemGuard<'a, Vec<WaitQueue>>, + _guard: SemGuard<'a, Vec<WaitQueue>>, /// Inner condition variable which is connected to the outer mutex, and can /// be used for atomic-unlock-and-deschedule. pub cond: Condvar<'a>, @@ -421,7 +421,7 @@ impl Mutex { /// also be accessed through the returned guard. pub fn lock<'a>(&'a self) -> MutexGuard<'a> { let SemCondGuard { guard, cvar } = self.sem.access_cond(); - MutexGuard { guard: guard, cond: cvar } + MutexGuard { _guard: guard, cond: cvar } } } |
