diff options
| -rw-r--r-- | src/librustuv/idle.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/librustuv/idle.rs b/src/librustuv/idle.rs index bc28c5e109e..1f059ca9fb9 100644 --- a/src/librustuv/idle.rs +++ b/src/librustuv/idle.rs @@ -113,8 +113,7 @@ mod test { fn call(&mut self) { let task = match *self { MyCallback(ref rc, n) => { - let mut slot = rc.borrow_mut(); - match *slot.get() { + match *rc.borrow_mut().deref_mut() { (ref mut task, ref mut val) => { *val = n; match task.take() { @@ -140,8 +139,7 @@ mod test { fn sleep(chan: &Chan) -> uint { let task: ~Task = Local::take(); task.deschedule(1, |task| { - let mut slot = chan.borrow_mut(); - match *slot.get() { + match *chan.borrow_mut().deref_mut() { (ref mut slot, _) => { assert!(slot.is_none()); *slot = Some(task); @@ -150,8 +148,7 @@ mod test { Ok(()) }); - let slot = chan.borrow(); - match *slot.get() { (_, n) => n } + match *chan.borrow() { (_, n) => n } } #[test] |
