Tested unix improved some exampels

This commit is contained in:
= 2018-08-24 23:51:39 +02:00
parent ff41d4f244
commit 29ae520ea8
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
extern crate crossterm; extern crate crossterm;
use crossterm::{Screen, Crossterm, screen}; use crossterm::{Screen, Crossterm};
use crossterm::terminal::{terminal,Terminal, ClearType}; use crossterm::terminal::{terminal,Terminal, ClearType};
use crossterm::cursor::{TerminalCursor, cursor}; use crossterm::cursor::{TerminalCursor, cursor};
use crossterm::input::input; use crossterm::input::input;

View File

@ -28,9 +28,8 @@ pub fn run()
print_welcome_screen(); print_welcome_screen();
// This is represents the current screen. // This is represents the current screen.
let screen = Screen::new(true); let mut screen = Screen::new(true);
start_algorithm(&screen); start_algorithm(&screen);
drop(screen);
} }
fn start_algorithm(screen: &Screen) fn start_algorithm(screen: &Screen)
@ -54,7 +53,8 @@ fn start_algorithm(screen: &Screen)
fn print_welcome_screen() fn print_welcome_screen()
{ {
let screen = Screen::default(); let mut screen = Screen::new(true);
let crossterm = Crossterm::new(&screen); let crossterm = Crossterm::new(&screen);
// create the handle for the cursor and terminal. // create the handle for the cursor and terminal.