From dd11cf4ab199e5d53d03dc95b24007a12727ad70 Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 22 May 2024 22:54:50 +0200 Subject: Start goprojekt istedet --- src/tui.rs | 24 ------------------------ 1 file changed, 24 deletions(-) delete mode 100644 src/tui.rs (limited to 'src/tui.rs') 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>; - -pub fn init() -> io::Result { - execute!(stdout(), EnterAlternateScreen)?; - enable_raw_mode()?; - Terminal::new(CrosstermBackend::new(stdout())) -} - -pub fn restore() -> io::Result<()> { - execute!(stdout(), LeaveAlternateScreen)?; - disable_raw_mode()?; - - Ok(()) -} -- cgit v1.2.3