rust/library/std/src/io/buffered
Takayuki Maeda baf3059f4e
Rollup merge of #116750 - fintelia:seek_seek_relative, r=Mark-Simulacrum
Add Seek::seek_relative

The `BufReader` struct has a `seek_relative` method because its `Seek::seek` implementation involved dumping the internal buffer (https://github.com/rust-lang/rust/issues/31100).

Unfortunately, there isn't really a good way to take advantage of that method in generic code. This PR adds the same method to the main `Seek` trait with the straightforward default method, and an override for `BufReader` that calls its implementation.

_Also discussed in [this](https://internals.rust-lang.org/t/add-seek-seek-relative/19546) internals.rust-lang.org thread._
2023-11-19 04:14:40 +09:00
..
bufreader Avoid defensive re-initialization of the BufReader buffer 2022-10-06 23:31:57 -04:00
bufreader.rs Rollup merge of #116750 - fintelia:seek_seek_relative, r=Mark-Simulacrum 2023-11-19 04:14:40 +09:00
bufwriter.rs Use std::io::Error::is_interrupted everywhere 2023-09-03 09:21:10 -04:00
linewriter.rs Relax implicit W: Sized bound on LineWriter<W> 2023-05-01 23:56:23 +00:00
linewritershim.rs Relax implicit W: Sized bound on LineWriter<W> 2023-05-01 23:56:23 +00:00
mod.rs Compute most of Public/Exported access level in rustc_resolve 2022-01-09 21:33:14 +00:00
tests.rs rewrite: line_long_tail_not_flushed description 2023-04-26 02:11:13 -04:00