Skip to content

Commit 76a1b5c

Browse files
committed
---
yaml --- r: 94195 b: refs/heads/try c: 8c2ebe1 h: refs/heads/master i: 94193: a2e0f39 94191: 016c732 v: v3
1 parent 12ba968 commit 76a1b5c

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 0da105a8b7b6b1e0568e8ff20f6ff4b13cc7ecc2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
5-
refs/heads/try: 9a6ebbbeccd926dc9eed1cfc34534bebb590ec75
5+
refs/heads/try: 8c2ebe1622681c2a93a2fcf2673a5671fd110ead
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/libextra/arc.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,6 @@ mod tests {
597597

598598
use arc::*;
599599

600-
use std::cell::Cell;
601600
use std::comm;
602601
use std::task;
603602

@@ -628,7 +627,6 @@ mod tests {
628627
let arc = ~MutexArc::new(false);
629628
let arc2 = ~arc.clone();
630629
let (p,c) = comm::oneshot();
631-
let c = Cell::new(c);
632630
do task::spawn {
633631
// wait until parent gets in
634632
p.recv();
@@ -638,8 +636,9 @@ mod tests {
638636
})
639637
}
640638

639+
let mut c = Some(c);
641640
arc.access_cond(|state, cond| {
642-
c.take().send(());
641+
c.take_unwrap().send(());
643642
assert!(!*state);
644643
while !*state {
645644
cond.wait();

branches/try/src/libextra/sync.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,6 @@ mod tests {
676676
use sync::*;
677677

678678
use std::cast;
679-
use std::cell::Cell;
680679
use std::comm;
681680
use std::result;
682681
use std::task;
@@ -762,9 +761,9 @@ mod tests {
762761
let s = Semaphore::new(1);
763762
let s2 = s.clone();
764763
let (p, c) = comm::stream();
765-
let child_data = Cell::new((s2, c));
764+
let mut child_data = Some((s2, c));
766765
s.access(|| {
767-
let (s2, c) = child_data.take();
766+
let (s2, c) = child_data.take_unwrap();
768767
do task::spawn {
769768
c.send(());
770769
s2.access(|| { });
@@ -947,13 +946,13 @@ mod tests {
947946
let mut sibling_convos = ~[];
948947
2.times(|| {
949948
let (p, c) = comm::stream();
950-
let c = Cell::new(c);
951949
sibling_convos.push(p);
952950
let mi = m2.clone();
953951
// spawn sibling task
954952
do task::spawn { // linked
953+
let mut c = Some(c);
955954
mi.lock_cond(|cond| {
956-
let c = c.take();
955+
let c = c.take_unwrap();
957956
c.send(()); // tell sibling to go ahead
958957
(|| {
959958
cond.wait(); // block forever

0 commit comments

Comments
 (0)