Skip to content

Commit

Permalink
fix: incorrect parameter to fd.read
Browse files Browse the repository at this point in the history
  • Loading branch information
joshka committed May 5, 2024
1 parent 09cf056 commit 7c67a28
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/event/source/unix/tty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl UnixInternalEventSource {
/// only fills the given buffer and does not read beyond that.
fn read_complete(fd: &FileDesc, buf: &mut [u8]) -> io::Result<usize> {
loop {
match fd.read(buf, buf.len()) {
match fd.read(buf) {
Ok(x) => return Ok(x),
Err(e) => match e.kind() {
io::ErrorKind::WouldBlock => return Ok(0),
Expand Down

0 comments on commit 7c67a28

Please sign in to comment.