about summary refs log tree commit diff
path: root/src/libstd/cleanup.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2013-10-06 13:24:50 -0700
committerAlex Crichton <alex@alexcrichton.com>2013-10-10 03:38:51 -0700
commitb07ab1fe4baa584401fa17a7ba20bea8c97c5043 (patch)
tree4badfcd00208c0c9686b678b72c36183f54ca8fb /src/libstd/cleanup.rs
parent2e0f3f5b510112395a40a0cb5bfbb6aac510d808 (diff)
downloadrust-b07ab1fe4baa584401fa17a7ba20bea8c97c5043.tar.gz
rust-b07ab1fe4baa584401fa17a7ba20bea8c97c5043.zip
Migrate users of io::fd_t to io::native::file::fd_t
Diffstat (limited to 'src/libstd/cleanup.rs')
-rw-r--r--src/libstd/cleanup.rs17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/libstd/cleanup.rs b/src/libstd/cleanup.rs
index 6b982ec75da..1c9944664ee 100644
--- a/src/libstd/cleanup.rs
+++ b/src/libstd/cleanup.rs
@@ -68,9 +68,6 @@ fn debug_mem() -> bool {
 /// Destroys all managed memory (i.e. @ boxes) held by the current task.
 pub unsafe fn annihilate() {
     use rt::local_heap::local_free;
-    use io::WriterUtil;
-    use io;
-    use libc;
     use sys;
     use managed;
 
@@ -126,14 +123,10 @@ pub unsafe fn annihilate() {
 
     if debug_mem() {
         // We do logging here w/o allocation.
-        let dbg = libc::STDERR_FILENO as io::fd_t;
-        dbg.write_str("annihilator stats:");
-        dbg.write_str("\n  total_boxes: ");
-        dbg.write_uint(stats.n_total_boxes);
-        dbg.write_str("\n  unique_boxes: ");
-        dbg.write_uint(stats.n_unique_boxes);
-        dbg.write_str("\n  bytes_freed: ");
-        dbg.write_uint(stats.n_bytes_freed);
-        dbg.write_str("\n");
+        rterrln!("annihilator stats:\n  \
+                     total boxes: {}\n  \
+                    unique boxes: {}\n  \
+                     bytes freed: {}",
+                 stats.n_total_boxes, stats.n_unique_boxes, stats.n_bytes_freed);
     }
 }