diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-02-17 06:29:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-17 06:29:59 +0100 |
| commit | d855121a44afd0fc9a5f1c2d263af48e9857a5f4 (patch) | |
| tree | 631371cce534447bcba9b9ed8d300006d32b5760 /library/test/src/formatters | |
| parent | 1cc0ae4cbbcb9909035b5b99fc20bf6b79f4010c (diff) | |
| parent | 96d96a7ac48cd8becf3133035ab0cf0717a4cf75 (diff) | |
Rollup merge of #93479 - smoelius:master, r=yaahc
Use `optflag` for `--report-time` Essentially, what is described here: https://github.com/rust-lang/rust/issues/64888#issuecomment-1008047228 There is one difference. The comment proposes to add a `--report-time-color` option. This change instead uses libtest's existing `--color` option for that purpose.
Diffstat (limited to 'library/test/src/formatters')
| -rw-r--r-- | library/test/src/formatters/pretty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/test/src/formatters/pretty.rs b/library/test/src/formatters/pretty.rs index 4726ae864df..041df5216d7 100644 --- a/library/test/src/formatters/pretty.rs +++ b/library/test/src/formatters/pretty.rs @@ -98,7 +98,7 @@ impl<T: Write> PrettyFormatter<T> { if let (Some(opts), Some(time)) = (self.time_options, exec_time) { let time_str = format!(" <{}>", time); - let color = if opts.colored { + let color = if self.use_color { if opts.is_critical(desc, time) { Some(term::color::RED) } else if opts.is_warn(desc, time) { |
