rustc: Remove all usage of manual deref()

Favor using '*' instead
This commit is contained in:
Alex Crichton 2014-03-20 22:10:44 -07:00
parent 76f0b1ad1f
commit 3fb1ed0e04
27 changed files with 61 additions and 68 deletions

View file

@ -113,7 +113,7 @@ mod test {
fn call(&mut self) {
let task = match *self {
MyCallback(ref rc, n) => {
let mut slot = rc.deref().borrow_mut();
let mut slot = rc.borrow_mut();
match *slot.get() {
(ref mut task, ref mut val) => {
*val = n;
@ -140,7 +140,7 @@ mod test {
fn sleep(chan: &Chan) -> uint {
let task: ~Task = Local::take();
task.deschedule(1, |task| {
let mut slot = chan.deref().borrow_mut();
let mut slot = chan.borrow_mut();
match *slot.get() {
(ref mut slot, _) => {
assert!(slot.is_none());
@ -150,7 +150,7 @@ mod test {
Ok(())
});
let slot = chan.deref().borrow();
let slot = chan.borrow();
match *slot.get() { (_, n) => n }
}