Impl io::Seek for FileLock

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-26 22:52:25 +10:00
parent ebb2d5d0c3
commit ce50186f4a
No known key found for this signature in database
GPG key ID: 591C0B03040416D6

View file

@ -66,3 +66,16 @@ impl io::Read for FileLock {
self.0.read_vectored(bufs)
}
}
impl io::Seek for FileLock {
fn seek(&mut self, pos: io::SeekFrom) -> io::Result<u64> {
self.0.seek(pos)
}
fn rewind(&mut self) -> io::Result<()> {
self.0.rewind()
}
fn stream_position(&mut self) -> io::Result<u64> {
self.0.stream_position()
}
}