Skip to content

Commit f4cb5c0

Browse files
authored
dump: fix some missing section colors (#2174)
I noticed that the data count and start sections were not dumped with header colors like the rest of the sections. I suspect this is because the `Dump::section` helper does that automatically but these sections are parsed a bit differently. This adds colors to those sections.
1 parent ffb4329 commit f4cb5c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/wasm-tools/dump.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,13 +163,13 @@ impl<'a> Dump<'a> {
163163
})?,
164164
Payload::StartSection { func, range } => {
165165
write!(self.state, "start section")?;
166-
self.print(range.start)?;
166+
self.color_print(range.start)?;
167167
write!(self.state, "start function {func}")?;
168168
self.print(range.end)?;
169169
}
170170
Payload::DataCountSection { count, range } => {
171171
write!(self.state, "data count section")?;
172-
self.print(range.start)?;
172+
self.color_print(range.start)?;
173173
write!(self.state, "data count {count}")?;
174174
self.print(range.end)?;
175175
}

0 commit comments

Comments
 (0)