mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-22 14:02:22 -05:00
Use var_os to avoid conversion to String
This commit is contained in:
parent
7560aec66b
commit
8ad18de54c
1 changed files with 1 additions and 1 deletions
|
@ -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!(
|
||||||
|
|
Loading…
Reference in a new issue