Fix coloring output of multi-line traces.
This commit is contained in:
parent
858e45f3f3
commit
42fdecf41f
|
@ -316,7 +316,11 @@ fn fmt_test(eval_info: &EvalInfo, max_mem: usize, max_cpu: usize, styled: bool)
|
|||
format!(
|
||||
"{arrow} {styled_line}",
|
||||
arrow = "↳".if_supports_color(Stderr, |s| s.bright_yellow()),
|
||||
styled_line = line.if_supports_color(Stderr, |s| s.bright_black())
|
||||
styled_line = line
|
||||
.split('\n')
|
||||
.map(|l| format!("{}", l.if_supports_color(Stderr, |s| s.bright_black())))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n")
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
|
Loading…
Reference in New Issue