summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/src/display.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/src/display.rs b/utils/src/display.rs
index 50b0858..fc94d90 100644
--- a/utils/src/display.rs
+++ b/utils/src/display.rs
@@ -330,7 +330,9 @@ pub fn md(text: impl AsRef<str>) -> String {
}
// Helper function to apply color to text
-fn apply_color(text: &str, color_name: &str) -> String {
+fn apply_color(text: impl AsRef<str>, color_name: impl AsRef<str>) -> String {
+ let text = text.as_ref();
+ let color_name = color_name.as_ref();
match color_name {
// Normal colors
"black" => text.black().to_string(),