unplugged-system/external/rust/crates/anes/examples/stdout.rs

13 lines
303 B
Rust

/// An example how to use the ANSI escape sequence.
use std::io::{Result, Write};
use anes;
fn main() -> Result<()> {
let mut stdout = std::io::stdout();
write!(stdout, "{}", anes::SaveCursorPosition)?;
write!(stdout, "{}", anes::RestoreCursorPosition)?;
stdout.flush()?;
Ok(())
}