From 87c6416d0caff986965a40b038c919d12014ee30 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Thu, 8 Sep 2011 13:23:06 -0700 Subject: [PATCH] rt: Don't double-print commas when logging e.g. a vec of boxes --- src/rt/rust_shape.cpp | 1 + src/rt/rust_shape.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/rt/rust_shape.cpp b/src/rt/rust_shape.cpp index 47f8b1d688e..7f242143d51 100644 --- a/src/rt/rust_shape.cpp +++ b/src/rt/rust_shape.cpp @@ -440,6 +440,7 @@ log::walk_string(const std::pair &data) { void log::walk_struct(const uint8_t *end_sp) { out << prefix << "("; + prefix = ""; bool first = true; while (sp != end_sp) { diff --git a/src/rt/rust_shape.h b/src/rt/rust_shape.h index 16a271cf5ff..96dac8054e1 100644 --- a/src/rt/rust_shape.h +++ b/src/rt/rust_shape.h @@ -984,16 +984,19 @@ private: void walk_box() { out << prefix << "@"; + prefix = ""; data::walk_box_contents(); } void walk_fn() { out << prefix << "fn"; + prefix = ""; data::walk_fn_contents(dp); } void walk_obj() { out << prefix << "obj"; + prefix = ""; data::walk_obj_contents(dp); }