From 29ae520ea85bf0c846da45da6521cf335ae00748 Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 24 Aug 2018 23:51:39 +0200 Subject: [PATCH] Tested unix improved some exampels --- examples/program_examples/command_bar.rs | 2 +- examples/program_examples/first_depth_search/src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/program_examples/command_bar.rs b/examples/program_examples/command_bar.rs index 2b33c03..3afd0d5 100644 --- a/examples/program_examples/command_bar.rs +++ b/examples/program_examples/command_bar.rs @@ -1,6 +1,6 @@ extern crate crossterm; -use crossterm::{Screen, Crossterm, screen}; +use crossterm::{Screen, Crossterm}; use crossterm::terminal::{terminal,Terminal, ClearType}; use crossterm::cursor::{TerminalCursor, cursor}; use crossterm::input::input; diff --git a/examples/program_examples/first_depth_search/src/main.rs b/examples/program_examples/first_depth_search/src/main.rs index 4559ba3..fdeaa20 100644 --- a/examples/program_examples/first_depth_search/src/main.rs +++ b/examples/program_examples/first_depth_search/src/main.rs @@ -28,9 +28,8 @@ pub fn run() print_welcome_screen(); // This is represents the current screen. - let screen = Screen::new(true); + let mut screen = Screen::new(true); start_algorithm(&screen); - drop(screen); } fn start_algorithm(screen: &Screen) @@ -54,7 +53,8 @@ fn start_algorithm(screen: &Screen) fn print_welcome_screen() { - let screen = Screen::default(); + let mut screen = Screen::new(true); + let crossterm = Crossterm::new(&screen); // create the handle for the cursor and terminal.