mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 20:48:43 +00:00
Impl io::Write
for helpers::FileLock
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
172af54cd8
commit
46c4d6f406
1 changed files with 13 additions and 0 deletions
|
@ -43,3 +43,16 @@ impl ops::DerefMut for FileLock {
|
|||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl io::Write for FileLock {
|
||||
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
|
||||
self.0.write(buf)
|
||||
}
|
||||
fn flush(&mut self) -> io::Result<()> {
|
||||
self.0.flush()
|
||||
}
|
||||
|
||||
fn write_vectored(&mut self, bufs: &[io::IoSlice<'_>]) -> io::Result<usize> {
|
||||
self.0.write_vectored(bufs)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue