Skip to content

Commit

Permalink
rustuv: Remove usage of get()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Mar 22, 2014
1 parent 3fb1ed0 commit 9dc357b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/librustuv/idle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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);
Expand All @@ -150,8 +148,7 @@ mod test {
Ok(())
});

let slot = chan.borrow();
match *slot.get() { (_, n) => n }
match *chan.borrow() { (_, n) => n }
}

#[test]
Expand Down

5 comments on commit 9dc357b

@bors
Copy link
Contributor

@bors bors commented on 9dc357b Mar 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from huonw
at alexcrichton@9dc357b

@bors
Copy link
Contributor

@bors bors commented on 9dc357b Mar 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/removing-ref-cell-get = 9dc357b into auto

@bors
Copy link
Contributor

@bors bors commented on 9dc357b Mar 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/removing-ref-cell-get = 9dc357b merged ok, testing candidate = 403e869

@bors
Copy link
Contributor

@bors bors commented on 9dc357b Mar 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 9dc357b Mar 22, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 403e869

Please sign in to comment.