Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
OlofBlomqvist committed Mar 5, 2024
1 parent 236b0c6 commit 9297760
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ struct Args {
generate_example_cfg : bool
}

use reqwest;

use serde::Deserialize;
use serde_json::Result as JsonResult;

Expand Down Expand Up @@ -523,7 +523,16 @@ async fn main() -> Result<(),String> {

if use_tui {
println!("Performing cleanup, please wait..");
_ = crossterm::terminal::disable_raw_mode();

use crossterm::{
event::{self, DisableMouseCapture, EnableMouseCapture, Event, KeyCode},
execute,
terminal::{
disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
};
_ = disable_raw_mode();
let mut stdout = std::io::stdout();
_ = execute!(stdout, LeaveAlternateScreen, DisableMouseCapture);
} else {
tracing::info!("Performing cleanup, please wait..");
}
Expand Down

0 comments on commit 9297760

Please sign in to comment.