Skip to content

Commit dd41f04

Browse files
committed
auto merge of #4843 : ILyoan/rust/i1531, r=catamorphism
Fix for #1531
2 parents e563722 + e7c6735 commit dd41f04

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/rt/rust_log.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,12 @@ void update_crate_map(const cratemap* map, log_directive* dirs,
245245
iter_crate_map(map, update_entry, &args);
246246
}
247247

248+
void print_mod_name(const mod_entry* mod, void *cooke) {
249+
printf(" %s\n", mod->name);
250+
}
251+
248252
void print_crate_log_map(const cratemap* map) {
249-
for (const mod_entry* cur = map->entries(); cur->name; cur++) {
250-
printf(" %s\n", cur->name);
251-
}
252-
for (cratemap::iterator i = map->begin(), e = map->end(); i != e; ++i) {
253-
print_crate_log_map(*i);
254-
}
253+
iter_crate_map(map, print_mod_name, NULL);
255254
}
256255

257256
// These are pseudo-modules used to control logging in the runtime.

0 commit comments

Comments
 (0)