Skip to content

Commit f4407fe

Browse files
committed
Add stream_len and stream_position implementations
1 parent b397da7 commit f4407fe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

library/std/src/io/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3117,6 +3117,14 @@ impl<T: Seek> Seek for Take<T> {
31173117
Ok(self.position())
31183118
}
31193119
}
3120+
3121+
fn stream_len(&mut self) -> Result<u64> {
3122+
Ok(self.len)
3123+
}
3124+
3125+
fn stream_position(&mut self) -> Result<u64> {
3126+
Ok(self.position())
3127+
}
31203128
}
31213129

31223130
/// An iterator over `u8` values of a reader.

0 commit comments

Comments
 (0)