Check if colors should be used based on this mode.
(&self)
| 55 | impl ColorMode { |
| 56 | /// Check if colors should be used based on this mode. |
| 57 | pub fn should_colorize(&self) -> bool { |
| 58 | match self { |
| 59 | Self::Auto => console::colors_enabled(), |
| 60 | Self::Always => true, |
| 61 | Self::Never => false, |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | impl std::fmt::Display for ColorMode { |
nothing calls this directly
no outgoing calls
no test coverage detected