about summary refs log tree commit diff
path: root/src/libstd/uv_iotask.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-04-22 14:27:30 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-04-29 14:30:53 -0700
commitb0522a497ccfcc7b124d77121d8f076af7f09b71 (patch)
treefd6ce4ae9b4ff0ea4e538240bdef8ac72712dc93 /src/libstd/uv_iotask.rs
parent58791c2fd884ad1af626df478c2b509e894b29ee (diff)
downloadrust-b0522a497ccfcc7b124d77121d8f076af7f09b71.tar.gz
rust-b0522a497ccfcc7b124d77121d8f076af7f09b71.zip
librustc: Remove `ptr::addr_of`.
Diffstat (limited to 'src/libstd/uv_iotask.rs')
-rw-r--r--src/libstd/uv_iotask.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libstd/uv_iotask.rs b/src/libstd/uv_iotask.rs
index 309ae32dc59..e19010e8552 100644
--- a/src/libstd/uv_iotask.rs
+++ b/src/libstd/uv_iotask.rs
@@ -17,10 +17,9 @@
 
 use ll = uv_ll;
 
+use core::comm::{stream, Port, Chan, SharedChan};
 use core::libc::c_void;
 use core::libc;
-use core::comm::{stream, Port, Chan, SharedChan};
-use core::ptr::addr_of;
 
 /// Used to abstract-away direct interaction with a libuv loop.
 pub struct IoTask {
@@ -106,7 +105,7 @@ fn run_loop(iotask_ch: &Chan<IoTask>) {
         // set up the special async handle we'll use to allow multi-task
         // communication with this loop
         let async = ll::async_t();
-        let async_handle = addr_of(&async);
+        let async_handle: *ll::uv_async_t = &async;
 
         // associate the async handle with the loop
         ll::async_init(loop_ptr, async_handle, wake_up_cb);
@@ -118,11 +117,11 @@ fn run_loop(iotask_ch: &Chan<IoTask>) {
             async_handle: async_handle,
             msg_po: msg_po
         };
-        ll::set_data_for_uv_handle(async_handle, addr_of(&data));
+        ll::set_data_for_uv_handle(async_handle, &data);
 
         // Send out a handle through which folks can talk to us
         // while we dwell in the I/O loop
-        let iotask = IoTask{
+        let iotask = IoTask {
             async_handle: async_handle,
             op_chan: SharedChan::new(msg_ch)
         };
@@ -223,7 +222,7 @@ struct AhData {
 #[cfg(test)]
 fn impl_uv_iotask_async(iotask: &IoTask) {
     let async_handle = ll::async_t();
-    let ah_ptr = ptr::addr_of(&async_handle);
+    let ah_ptr: *ll::uv_async_t = &async_handle;
     let (exit_po, exit_ch) = stream::<()>();
     let ah_data = AhData {
         iotask: iotask.clone(),