From 302debebb3a3b765b3d13f3244eb4625d7d610c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Tue, 18 Feb 2020 10:08:18 -0500 Subject: refactor: cleanup cli/lib.rs (#4006) * rename methods on Worker related to module loading * reorganize cli/lib.rs * remove cli/progress.rs and cli/shell.rs --- cli/colors.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'cli/colors.rs') diff --git a/cli/colors.rs b/cli/colors.rs index f792e2b33..0bf048943 100644 --- a/cli/colors.rs +++ b/cli/colors.rs @@ -78,6 +78,14 @@ pub fn red(s: String) -> impl fmt::Display { style.paint(s) } +pub fn green(s: String) -> impl fmt::Display { + let mut style = Style::new(); + if use_color() { + style = style.fg(Fixed(10)).bold(); + } + style.paint(s) +} + pub fn bold(s: String) -> impl fmt::Display { let mut style = Style::new(); if use_color() { -- cgit v1.2.3