mirror of
https://github.com/Xyverle/neutuino.git
synced 2026-08-31 20:00:02 -04:00
Add terminal check in examples
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
|
||||
use neutuino::prelude::*;
|
||||
use std::{
|
||||
io::{self, Write},
|
||||
io::{self, IsTerminal, Write},
|
||||
thread, time,
|
||||
};
|
||||
|
||||
fn main() -> io::Result<()> {
|
||||
assert!(io::stdout().is_terminal(), "Not running in a terminal");
|
||||
|
||||
enable_ansi()?;
|
||||
|
||||
// makes the terminal raw until this value is dropped
|
||||
|
||||
Reference in New Issue
Block a user