mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-04 02:54:00 +00:00
Rollup merge of #86121 - nickshiling:forwarding_impl_for_seek_trait_stream_position, r=dtolnay
Forwarding implementation for Seek trait's stream_position method Forwarding implementations for `Seek` trait's `stream_position` were missed when it was stabilized in `1.51.0`
This commit is contained in:
commit
c961a0fc88
@ -87,6 +87,11 @@ impl<S: Seek + ?Sized> Seek for &mut S {
|
|||||||
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
|
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
|
||||||
(**self).seek(pos)
|
(**self).seek(pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn stream_position(&mut self) -> io::Result<u64> {
|
||||||
|
(**self).stream_position()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<B: BufRead + ?Sized> BufRead for &mut B {
|
impl<B: BufRead + ?Sized> BufRead for &mut B {
|
||||||
@ -186,6 +191,11 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
|
|||||||
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
|
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
|
||||||
(**self).seek(pos)
|
(**self).seek(pos)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
fn stream_position(&mut self) -> io::Result<u64> {
|
||||||
|
(**self).stream_position()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#[stable(feature = "rust1", since = "1.0.0")]
|
#[stable(feature = "rust1", since = "1.0.0")]
|
||||||
impl<B: BufRead + ?Sized> BufRead for Box<B> {
|
impl<B: BufRead + ?Sized> BufRead for Box<B> {
|
||||||
|
Loading…
Reference in New Issue
Block a user