From 7c67a286c71c5546425a9160e9a29e7f99815422 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Sun, 5 May 2024 03:13:27 -0700 Subject: [PATCH] fix: incorrect parameter to fd.read --- src/event/source/unix/tty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event/source/unix/tty.rs b/src/event/source/unix/tty.rs index 320a12ca..b8cbfeff 100644 --- a/src/event/source/unix/tty.rs +++ b/src/event/source/unix/tty.rs @@ -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 { 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),