removed in examples for unused variables
This commit is contained in:
		
							parent
							
								
									cb08b6b984
								
							
						
					
					
						commit
						61188e6353
					
				| @ -21,7 +21,7 @@ pub fn pos() { | |||||||
|     let screen = Screen::default(); |     let screen = Screen::default(); | ||||||
|     let mut cursor = cursor(&screen); |     let mut cursor = cursor(&screen); | ||||||
|     // get the cursor position.
 |     // get the cursor position.
 | ||||||
|     let (_x, _y) = cursor.pos(); |     let (x, y) = cursor.pos(); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /// Move the cursor 3 up | demonstration.
 | /// Move the cursor 3 up | demonstration.
 | ||||||
|  | |||||||
| @ -21,7 +21,7 @@ pub fn read_async_until() { | |||||||
| 
 | 
 | ||||||
|     let mut stdin = input.read_until_async(b'\r').bytes(); |     let mut stdin = input.read_until_async(b'\r').bytes(); | ||||||
| 
 | 
 | ||||||
|     for _i in 0..100 { |     for i in 0..100 { | ||||||
|         terminal.clear(ClearType::All); |         terminal.clear(ClearType::All); | ||||||
|         cursor.goto(1, 1); |         cursor.goto(1, 1); | ||||||
|         let a = stdin.next(); |         let a = stdin.next(); | ||||||
|  | |||||||
| @ -35,9 +35,9 @@ fn main() { | |||||||
|                     { |                     { | ||||||
|                         input_buf.lock().unwrap().clear(); |                         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 |     for i in 0..1 | ||||||
|     { |     { | ||||||
|         let input_buffer = input_buf.clone(); |         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()); |         let crossterm = Crossterm::from(screen.stdout.clone()); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -89,7 +89,7 @@ fn main() | |||||||
|     let queue = WorkQueue::new(); |     let queue = WorkQueue::new(); | ||||||
| 
 | 
 | ||||||
|     //  queue x logs with different threads.
 |     //  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.
 |     // a thread that will log all logs in the queue.
 | ||||||
|     handle_incoming_logs(more_jobs_rx.clone(), queue.clone()); |     handle_incoming_logs(more_jobs_rx.clone(), queue.clone()); | ||||||
|  | |||||||
| @ -12,10 +12,10 @@ pub fn use_crossterm_cursor() | |||||||
|     let crossterm = Crossterm::new(&screen); |     let crossterm = Crossterm::new(&screen); | ||||||
| 
 | 
 | ||||||
|     // pass a reference to the current screen.
 |     // pass a reference to the current screen.
 | ||||||
|     let _cursor = crossterm.cursor(); |     let cursor = crossterm.cursor(); | ||||||
|     let _color = crossterm.color(); |     let color = crossterm.color(); | ||||||
|     let _terminal = crossterm.terminal(); |     let terminal = crossterm.terminal(); | ||||||
|     let _style = crossterm.style("").with(Color::Black).on(Color::Green); |     let style = crossterm.style("").with(Color::Black).on(Color::Green); | ||||||
| 
 | 
 | ||||||
|     // perform some actions with the instances above.
 |     // perform some actions with the instances above.
 | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user