Skip to content

Commit

Permalink
Do not output () on empty description
Browse files Browse the repository at this point in the history
  • Loading branch information
capickett committed Sep 26, 2024
1 parent 4428a05 commit d3ea0e4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1570,9 +1570,11 @@ Executed at: {executed_at}"#,
fn rust_version(&self) -> String {
let mut version = self.rust_info().version(self, &self.version);
if let Some(ref s) = self.config.description {
version.push_str(" (");
version.push_str(s);
version.push(')');
if !s.is_empty() {
version.push_str(" (");
version.push_str(s);
version.push(')');
}
}
version
}
Expand Down

0 comments on commit d3ea0e4

Please sign in to comment.