summaryrefslogtreecommitdiff
path: root/src/ui.rs
blob: 38cbaa40ba09c43f974bdcba13524192a9c9ec59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
macro_rules! warn {
    ($fmt:literal, $ex:expr) => {{
        use console::{style, Emoji};
        let formatstr = format!($fmt, $ex);
        println!(
            "{} {}",
            style(Emoji("⚠️ ", "!")).red(),
            style(formatstr).red()
        );
    }};
}

macro_rules! success {
    ($fmt:literal, $ex:expr) => {{
        use console::{style, Emoji};
        let formatstr = format!($fmt, $ex);
        println!(
            "{} {}",
            style(Emoji("✅", "✓")).green(),
            style(formatstr).green()
        );
    }};
}