mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-08-10 22:42:13 +02:00
Use var_os to avoid conversion to String
This commit is contained in:
@@ -3,7 +3,7 @@ macro_rules! print_emoji {
|
|||||||
use console::{style, Emoji};
|
use console::{style, Emoji};
|
||||||
use std::env;
|
use std::env;
|
||||||
let formatstr = format!($fmt, $ex);
|
let formatstr = format!($fmt, $ex);
|
||||||
if env::var("NO_EMOJI").is_ok() {
|
if env::var_os("NO_EMOJI").is_some() {
|
||||||
println!("{} {}", style($sign).$color(), style(formatstr).$color());
|
println!("{} {}", style($sign).$color(), style(formatstr).$color());
|
||||||
} else {
|
} else {
|
||||||
println!(
|
println!(
|
||||||
|
Reference in New Issue
Block a user