Skip to content

Commit 7a365e4

Browse files
committed
make bblum happy
1 parent 35f3680 commit 7a365e4

File tree

1 file changed

+6
-17
lines changed

1 file changed

+6
-17
lines changed

src/libstd/sync.rs

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,36 +158,25 @@ impl &Sem<~[mut Waitqueue]> {
158158

159159
// FIXME(#3588) should go inside of access()
160160
#[doc(hidden)]
161-
struct SemRelease {
162-
sem: &Sem<()>,
163-
}
161+
type SemRelease = SemReleaseGeneric<()>;
162+
type SemAndSignalRelease = SemReleaseGeneric<~[mut Waitqueue]>;
163+
struct SemReleaseGeneric<Q: Send> { sem: &Sem<Q> }
164164

165-
impl SemRelease : Drop {
165+
impl<Q: Send> SemReleaseGeneric<Q> : Drop {
166166
fn finalize(&self) {
167167
self.sem.release();
168168
}
169169
}
170170

171171
fn SemRelease(sem: &r/Sem<()>) -> SemRelease/&r {
172-
SemRelease {
172+
SemReleaseGeneric {
173173
sem: sem
174174
}
175175
}
176176

177-
#[doc(hidden)]
178-
struct SemAndSignalRelease {
179-
sem: &Sem<~[mut Waitqueue]>,
180-
}
181-
182-
impl SemAndSignalRelease : Drop {
183-
fn finalize(&self) {
184-
self.sem.release();
185-
}
186-
}
187-
188177
fn SemAndSignalRelease(sem: &r/Sem<~[mut Waitqueue]>)
189178
-> SemAndSignalRelease/&r {
190-
SemAndSignalRelease {
179+
SemReleaseGeneric {
191180
sem: sem
192181
}
193182
}

0 commit comments

Comments
 (0)