1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-06-15 00:04:58 +02:00

style: formatted files with rustfmt

This commit is contained in:
Zerotask
2021-04-18 15:40:47 +02:00
parent c0e3daacaf
commit bd48544e25
3 changed files with 7 additions and 16 deletions

View File

@ -1,14 +1,10 @@
macro_rules! warn {
($fmt:literal, $ex:expr) => {{
use std::env;
use console::{style, Emoji};
use std::env;
let formatstr = format!($fmt, $ex);
if env::var("NO_EMOJI").is_ok() {
println!(
"{} {}",
style("!").red(),
style(formatstr).red()
);
println!("{} {}", style("!").red(), style(formatstr).red());
} else {
println!(
"{} {}",
@ -21,15 +17,11 @@ macro_rules! warn {
macro_rules! success {
($fmt:literal, $ex:expr) => {{
use std::env;
use console::{style, Emoji};
use std::env;
let formatstr = format!($fmt, $ex);
if env::var("NO_EMOJI").is_ok() {
println!(
"{} {}",
style("").green(),
style(formatstr).green()
);
println!("{} {}", style("").green(), style(formatstr).green());
} else {
println!(
"{} {}",