mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-11-08 09:09:17 +01:00
43dc31193a
Exercise evaluation (compilation + execution) now uses Results Success/failure messages are standardized
24 lines
564 B
Rust
24 lines
564 B
Rust
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()
|
|
);
|
|
}};
|
|
}
|