Skip to main content

nextest_runner/config/core/
styles.rs

1// Copyright (c) The nextest Contributors
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4use owo_colors::Style;
5
6/// Terminal styles for configuration-related diagnostics.
7#[derive(Clone, Copy, Debug, Default)]
8pub struct ConfigStyles {
9    /// Style for a config file path.
10    pub path: Style,
11    /// Style for the name of the tool that provided a config file.
12    pub tool: Style,
13}
14
15impl ConfigStyles {
16    /// Colorizes the styles for terminal output.
17    pub fn colorize(&mut self) {
18        self.path = Style::new().cyan();
19        self.tool = Style::new().bold().yellow();
20    }
21}