1 2 3 4 5 6 7
use std::io::{self, Write}; /// Clears the terminal screen using ANSI escape codes. pub fn clear_screen() { print!("\x1B[2J\x1B[1;1H"); let _ = io::stdout().flush(); }