Skip to content

Commit

Permalink
Fix separator color
Browse files Browse the repository at this point in the history
  • Loading branch information
pablodiegoss committed Oct 24, 2019
1 parent cc6a9c8 commit ae95e95
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ impl std::fmt::Display for Info {
if !self.disable_fields.git_info{
let git_info;
if self.git_username != "" {
git_info = format!("{} : {}", self.git_username, self.git_version);
git_info = format!("{} : {}", self.git_username, self.git_version);
write!(&mut buf, "{}{}", &self.get_formatted_info_label(&self.git_username, color), " : ")?;
} else {
git_info = self.git_version.clone();
}
write_buf(&mut buf, &self.get_formatted_info_label(&git_info, color), "")?;
write_buf(&mut buf, &self.get_formatted_info_label(&self.git_version, color), "")?;
let separator = "-".repeat(git_info.len());
write_buf(&mut buf, &self.get_formatted_info_label("", color), &separator)?;
}
Expand Down

0 comments on commit ae95e95

Please sign in to comment.