diff options
| author | Samuel E. Moelius III <sam@moeli.us> | 2022-01-30 10:25:40 -0500 |
|---|---|---|
| committer | Samuel E. Moelius III <sam@moeli.us> | 2022-01-30 10:25:40 -0500 |
| commit | 96d96a7ac48cd8becf3133035ab0cf0717a4cf75 (patch) | |
| tree | 830a452e7f7c621f4f480966f0c96672905c9f0e /library/test/src/formatters | |
| parent | a00e130dae74a213338e2b095ec855156d8f3d8a (diff) | |
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 4a03b4b9147..5da275d4af7 100644 --- a/library/test/src/formatters/pretty.rs +++ b/library/test/src/formatters/pretty.rs @@ -102,7 +102,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) { |
