about summary refs log tree commit diff
path: root/src/rt/rust_log.cpp
diff options
context:
space:
mode:
authorILyoan <ilyoan@gmail.com>2013-02-08 14:10:55 +0900
committerILyoan <ilyoan@gmail.com>2013-02-08 14:11:00 +0900
commite7c6735e0d8e21f6857c015a69c23b2880b6709f (patch)
tree88c3d7c57c9e792787995e33d89ed4c56be57e6f /src/rt/rust_log.cpp
parente8fc4b347d3526d1adb21a5ff184c032fa2982c1 (diff)
downloadrust-e7c6735e0d8e21f6857c015a69c23b2880b6709f.tar.gz
rust-e7c6735e0d8e21f6857c015a69c23b2880b6709f.zip
Fixed #1531
Diffstat (limited to 'src/rt/rust_log.cpp')
-rw-r--r--src/rt/rust_log.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/rt/rust_log.cpp b/src/rt/rust_log.cpp
index cbad666ef2a..26c038e2507 100644
--- a/src/rt/rust_log.cpp
+++ b/src/rt/rust_log.cpp
@@ -245,13 +245,12 @@ void update_crate_map(const cratemap* map, log_directive* dirs,
     iter_crate_map(map, update_entry, &args);
 }
 
+void print_mod_name(const mod_entry* mod, void *cooke) {
+    printf(" %s\n", mod->name);
+}
+
 void print_crate_log_map(const cratemap* map) {
-    for (const mod_entry* cur = map->entries(); cur->name; cur++) {
-        printf("  %s\n", cur->name);
-    }
-    for (cratemap::iterator i = map->begin(), e = map->end(); i != e; ++i) {
-        print_crate_log_map(*i);
-    }
+    iter_crate_map(map, print_mod_name, NULL);
 }
 
 // These are pseudo-modules used to control logging in the runtime.