diff options
Diffstat (limited to 'src/tui.rs')
-rw-r--r-- | src/tui.rs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/src/tui.rs b/src/tui.rs deleted file mode 100644 index 7bae1ab..0000000 --- a/src/tui.rs +++ /dev/null @@ -1,24 +0,0 @@ -use crossterm::{execute, terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}}; - -use ratatui::{ - prelude::CrosstermBackend, - Terminal, -}; - -use std::io::{self, stdout, Stdout}; - - -pub type Tui = Terminal<CrosstermBackend<Stdout>>; - -pub fn init() -> io::Result<Tui> { - execute!(stdout(), EnterAlternateScreen)?; - enable_raw_mode()?; - Terminal::new(CrosstermBackend::new(stdout())) -} - -pub fn restore() -> io::Result<()> { - execute!(stdout(), LeaveAlternateScreen)?; - disable_raw_mode()?; - - Ok(()) -} |