std: clean up ptr a bit

This commit is contained in:
Corey Richardson
2014-02-14 18:42:01 -05:00
parent 3496e93d13
commit 49e11630fa
25 changed files with 128 additions and 220 deletions

View File

@@ -509,10 +509,10 @@ fn avoid_copying_the_body(spawnfn: |v: proc()|) {
let (p, ch) = Chan::<uint>::new();
let x = ~1;
let x_in_parent = ptr::to_unsafe_ptr(&*x) as uint;
let x_in_parent = (&*x) as *int as uint;
spawnfn(proc() {
let x_in_child = ptr::to_unsafe_ptr(&*x) as uint;
let x_in_child = (&*x) as *int as uint;
ch.send(x_in_child);
});