Format a warning message in yellow. Use this for warnings, cautions, or situations that need attention but aren't errors. # Arguments `text` - The text to format # Returns A styled object that displays in yellow when printed. # Example ```rust,ignore println!("{}", colors::warning("File will be overwritten")); ```
(text: D)
| 188 | /// println!("{}", colors::warning("File will be overwritten")); |
| 189 | /// ``` |
| 190 | pub fn warning<D: std::fmt::Display>(text: D) -> StyledObject<D> { |
| 191 | style(text).yellow() |
| 192 | } |
| 193 | |
| 194 | /// Format an error message in red. |
| 195 | /// |
no outgoing calls