mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 04:58:42 +00:00
Impl io::Read
for FileLock
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
c6c5dcd79f
commit
ebb2d5d0c3
1 changed files with 10 additions and 0 deletions
|
@ -56,3 +56,13 @@ impl io::Write for FileLock {
|
|||
self.0.write_vectored(bufs)
|
||||
}
|
||||
}
|
||||
|
||||
impl io::Read for FileLock {
|
||||
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
|
||||
self.0.read(buf)
|
||||
}
|
||||
|
||||
fn read_vectored(&mut self, bufs: &mut [io::IoSliceMut<'_>]) -> io::Result<usize> {
|
||||
self.0.read_vectored(bufs)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue