From 7b71252455a29a6d0a51c0db05195e8ce96aa6d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Katona?= Date: Sun, 17 Jul 2022 11:11:41 -0700 Subject: [PATCH] remove success_color --- src/vcs.rs | 9 +++------ src/vcs/colors.rs | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/vcs.rs b/src/vcs.rs index 66515fd..af12d3a 100644 --- a/src/vcs.rs +++ b/src/vcs.rs @@ -98,8 +98,7 @@ impl Vcs { pub fn status(&self) -> Result<(), Error> { if let Some(profile_name) = self.current_profile()? { println!( - "{}{} [{}] {}", - "Workspace is set to profile: ".with(SUCCESS_COLOR), + "Workspace is set to profile: {} [{}] {}", profile_name.bold().with(PROFILE_COLOR), format!("{}", self.work_dir.display()).italic(), self.min_msrv_str(), @@ -179,8 +178,7 @@ impl Vcs { fs::write(vcs_path, new_contents)?; println!( - "{}{}", - "Workspace state saved as ".with(SUCCESS_COLOR), + "Workspace state saved as {}", profile_name.with(PROFILE_COLOR), ); @@ -232,9 +230,8 @@ impl Vcs { for project in &self.projects { project.repo.checkout(branch_name)?; println!( - "{}{}{}", + "{} is set to branch: {}", project.name().with(PROJECT_COLOR), - " is set to branch: ".with(SUCCESS_COLOR), branch_name.bold().with(REFS_COLOR), ); } diff --git a/src/vcs/colors.rs b/src/vcs/colors.rs index e7c2c00..7d8662a 100644 --- a/src/vcs/colors.rs +++ b/src/vcs/colors.rs @@ -2,7 +2,6 @@ use crossterm::style::Color; pub const PROJECT_COLOR: Color = Color::Red; pub const PROFILE_COLOR: Color = Color::Blue; -pub const SUCCESS_COLOR: Color = Color::Green; pub const ERROR_COLOR: Color = Color::DarkRed; pub const CHANGES_COLOR: Color = Color::Cyan; pub const REFS_COLOR: Color = Color::DarkYellow;