Closed medakk closed 4 years ago
The library works fine when I am using print! or println!. But when writing to stdout, like:
print!
println!
let mut stdout = stdout(); let s = "Hello\n".truecolor(200, 50, 50); stdout.write(s.as_bytes()); stdout.flush();
I see only regular black-and-white text. How do I get the library to work with stdout?
never mind, I figure it out:
stdout.write(s.to_string().as_bytes())
You might also want to check out the write! macro. This should work fine
write!
write!(stdout, "{}", "Hello".truecolor(200, 50, 50));
The library works fine when I am using
print!
orprintln!
. But when writing to stdout, like:I see only regular black-and-white text. How do I get the library to work with stdout?