From fc49a29a1492f58a63aa183b7f2a6fd726c8edae Mon Sep 17 00:00:00 2001 From: DrMeepster <19316085+DrMeepster@users.noreply.github.com> Date: Tue, 29 Jun 2021 17:57:39 -0700 Subject: [PATCH] add read_buf for &File --- library/std/src/fs.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 55c22092c45..be01a031ff0 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -676,6 +676,10 @@ impl Read for &File { self.inner.read(buf) } + fn read_buf(&mut self, buf: &mut ReadBuf<'_>) -> io::Result<()> { + self.inner.read_buf(buf) + } + fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> io::Result { self.inner.read_vectored(bufs) }