Skip to content

Commit ed8a775

Browse files
committed
Forwarding implementation for Seek trait's stream_position method
1 parent e4a6032 commit ed8a775

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/std/src/io/impls.rs

+10
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,11 @@ impl<S: Seek + ?Sized> Seek for &mut S {
8787
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
8888
(**self).seek(pos)
8989
}
90+
91+
#[inline]
92+
fn stream_position(&mut self) -> io::Result<u64> {
93+
(**self).stream_position()
94+
}
9095
}
9196
#[stable(feature = "rust1", since = "1.0.0")]
9297
impl<B: BufRead + ?Sized> BufRead for &mut B {
@@ -186,6 +191,11 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
186191
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
187192
(**self).seek(pos)
188193
}
194+
195+
#[inline]
196+
fn stream_position(&mut self) -> io::Result<u64> {
197+
(**self).stream_position()
198+
}
189199
}
190200
#[stable(feature = "rust1", since = "1.0.0")]
191201
impl<B: BufRead + ?Sized> BufRead for Box<B> {

0 commit comments

Comments
 (0)