Skip to content

Commit 87c6416

Browse files
committed
rt: Don't double-print commas when logging e.g. a vec of boxes
1 parent a10a6da commit 87c6416

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/rt/rust_shape.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -440,6 +440,7 @@ log::walk_string(const std::pair<ptr,ptr> &data) {
440440
void
441441
log::walk_struct(const uint8_t *end_sp) {
442442
out << prefix << "(";
443+
prefix = "";
443444

444445
bool first = true;
445446
while (sp != end_sp) {

src/rt/rust_shape.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,16 +984,19 @@ class log : public data<log,ptr> {
984984

985985
void walk_box() {
986986
out << prefix << "@";
987+
prefix = "";
987988
data<log,ptr>::walk_box_contents();
988989
}
989990

990991
void walk_fn() {
991992
out << prefix << "fn";
993+
prefix = "";
992994
data<log,ptr>::walk_fn_contents(dp);
993995
}
994996

995997
void walk_obj() {
996998
out << prefix << "obj";
999+
prefix = "";
9971000
data<log,ptr>::walk_obj_contents(dp);
9981001
}
9991002

0 commit comments

Comments
 (0)