Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore: small emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Nov 16, 2021
1 parent 35ff6fc commit 898be1e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions xtask/src/compare/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,20 @@ pub fn emit_compare(base: &Path, new: &Path, markdown: bool) {
if markdown {
/// Generates a proper diff format, with some bold text if things change.
fn diff_format(diff: isize) -> String {
let emoji = if diff < 0 {
"❌ ⏬ "
} else if diff > 0 {
"✅ ⏫ "
} else {
""
};
format!(
"{}{}{}{}",
"{}{}{}{}{}",
emoji,
if diff != 0 { "**" } else { "" },
if diff > 0 { "+" } else { "" },
diff,
if diff != 0 { "**" } else { "" }
if diff != 0 { " **" } else { "" }
)
}

Expand Down

0 comments on commit 898be1e

Please sign in to comment.