mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Use var_os to avoid conversion to String
This commit is contained in:
parent
7560aec66b
commit
8ad18de54c
|
@ -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