Get a styled version of this status character.
(&self)
| 126 | |
| 127 | /// Get a styled version of this status character. |
| 128 | pub fn styled(&self) -> StyledObject<char> { |
| 129 | match self { |
| 130 | Self::Added => style(self.char()).green(), |
| 131 | Self::Modified => style(self.char()).yellow(), |
| 132 | Self::Deleted => style(self.char()).red(), |
| 133 | Self::Renamed => style(self.char()).cyan(), |
| 134 | Self::Untracked => style(self.char()).red(), |
| 135 | Self::Conflict => style(self.char()).red().bold(), |
| 136 | Self::Clean => style(self.char()), |
| 137 | } |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | impl std::fmt::Display for StatusChar { |