diff --git a/examples/clear_input_buffer.rs b/examples/clear_input_buffer.rs index 112a88c9..48491e43 100644 --- a/examples/clear_input_buffer.rs +++ b/examples/clear_input_buffer.rs @@ -125,7 +125,7 @@ fn input_service() -> mpsc::Receiver<()> { drop(tx); // EOF, drop the channel and stop the thread break; } - Ok(_) => tx.send(()).unwrap(), // Signal main to clear the buffer + Ok(_bytes_read) => tx.send(()).unwrap(), // Signal main to clear the buffer Err(e) => panic_any(e), } } diff --git a/examples/clear_output_buffer.rs b/examples/clear_output_buffer.rs index 631e3967..d873860e 100644 --- a/examples/clear_output_buffer.rs +++ b/examples/clear_output_buffer.rs @@ -85,7 +85,7 @@ fn run(port_name: &str, baud_rate: &str, block_size: usize) -> Result<(), Box (), Err(ref e) if e.kind() == io::ErrorKind::TimedOut => (), Err(e) => panic!("Error while writing data to the port: {}", e), @@ -125,7 +125,7 @@ fn input_service() -> mpsc::Receiver<()> { drop(tx); // EOF, drop the channel and stop the thread break; } - Ok(_) => tx.send(()).unwrap(), // Signal main to clear the buffer + Ok(_bytes_read) => tx.send(()).unwrap(), // Signal main to clear the buffer Err(e) => panic_any(e), } } diff --git a/tests/test_tty.rs b/tests/test_tty.rs index 02aa061f..46f4ae72 100644 --- a/tests/test_tty.rs +++ b/tests/test_tty.rs @@ -98,7 +98,7 @@ fn test_osx_pty_pair() { let (output_sink, output_stream) = std::sync::mpsc::sync_channel(1); let name = slave.name().unwrap(); - master.write("12".as_bytes()).expect(""); + master.write_all("12".as_bytes()).expect(""); let reader_thread = std::thread::spawn(move || { let mut port = TTYPort::open(&serialport::new(&name, 0)).expect("unable to open");