removed in examples for unused variables

This commit is contained in:
timon 2018-10-07 19:15:17 +02:00 committed by Timon
parent cb08b6b984
commit 61188e6353
5 changed files with 10 additions and 10 deletions

View File

@ -21,7 +21,7 @@ pub fn pos() {
let screen = Screen::default();
let mut cursor = cursor(&screen);
// get the cursor position.
let (_x, _y) = cursor.pos();
let (x, y) = cursor.pos();
}
/// Move the cursor 3 up | demonstration.

View File

@ -21,7 +21,7 @@ pub fn read_async_until() {
let mut stdin = input.read_until_async(b'\r').bytes();
for _i in 0..100 {
for i in 0..100 {
terminal.clear(ClearType::All);
cursor.goto(1, 1);
let a = stdin.next();

View File

@ -35,9 +35,9 @@ fn main() {
{
input_buf.lock().unwrap().clear();
}
Some(Ok(_val)) =>
Some(Ok(val)) =>
{
input_buf.lock().unwrap().push(a.unwrap().unwrap() as char);
input_buf.lock().unwrap().push(val as char);
}
_ => {}
}
@ -65,7 +65,7 @@ fn log(input_buf: Arc<Mutex<String>>, screen: &Screen) -> Vec<thread::JoinHandle
for i in 0..1
{
let input_buffer = input_buf.clone();
let _clone_stdout = screen.stdout.clone();
let clone_stdout = screen.stdout.clone();
let crossterm = Crossterm::from(screen.stdout.clone());

View File

@ -89,7 +89,7 @@ fn main()
let queue = WorkQueue::new();
// queue x logs with different threads.
let _thread_handles = log_with_different_threads(more_jobs_tx.clone(), queue.clone());
let thread_handles = log_with_different_threads(more_jobs_tx.clone(), queue.clone());
// a thread that will log all logs in the queue.
handle_incoming_logs(more_jobs_rx.clone(), queue.clone());

View File

@ -12,10 +12,10 @@ pub fn use_crossterm_cursor()
let crossterm = Crossterm::new(&screen);
// pass a reference to the current screen.
let _cursor = crossterm.cursor();
let _color = crossterm.color();
let _terminal = crossterm.terminal();
let _style = crossterm.style("").with(Color::Black).on(Color::Green);
let cursor = crossterm.cursor();
let color = crossterm.color();
let terminal = crossterm.terminal();
let style = crossterm.style("").with(Color::Black).on(Color::Green);
// perform some actions with the instances above.
}