From ed8a775b7146722954ed4a67ec859887b8befc34 Mon Sep 17 00:00:00 2001 From: myshylin Date: Mon, 7 Jun 2021 19:21:22 -0400 Subject: [PATCH] Forwarding implementation for Seek trait's stream_position method --- library/std/src/io/impls.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/library/std/src/io/impls.rs b/library/std/src/io/impls.rs index 6891bd8a66437..7a2a49ba7d707 100644 --- a/library/std/src/io/impls.rs +++ b/library/std/src/io/impls.rs @@ -87,6 +87,11 @@ impl Seek for &mut S { fn seek(&mut self, pos: SeekFrom) -> io::Result { (**self).seek(pos) } + + #[inline] + fn stream_position(&mut self) -> io::Result { + (**self).stream_position() + } } #[stable(feature = "rust1", since = "1.0.0")] impl BufRead for &mut B { @@ -186,6 +191,11 @@ impl Seek for Box { fn seek(&mut self, pos: SeekFrom) -> io::Result { (**self).seek(pos) } + + #[inline] + fn stream_position(&mut self) -> io::Result { + (**self).stream_position() + } } #[stable(feature = "rust1", since = "1.0.0")] impl BufRead for Box {