rust/library/std/src/io
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
..
buffered Rollup merge of #116750 - fintelia:seek_seek_relative, r=Mark-Simulacrum 2023-11-19 04:14:40 +09:00
copy additional io::copy specializations 2023-07-09 00:05:56 +02:00
cursor attempt to optimise vectored write 2022-06-26 17:15:31 +01:00
error Move RawOsError defination to sys 2023-09-03 12:35:03 +05:30
impls std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
stdio Make default stdio lock() return 'static handles 2022-02-13 10:23:16 -05:00
util Rollup merge of #98154 - vidhanio:master, r=workingjubilee 2023-07-30 20:36:33 +02:00
copy.rs detect EOF earlier 2023-11-04 16:11:01 +01:00
cursor.rs Rollup merge of #98651 - mattfbacon:master, r=ChrisDenton 2023-03-27 08:46:51 +02:00
error.rs Bump version placeholders 2023-10-03 20:26:36 -04:00
impls.rs Substitute version placeholders 2023-11-15 19:40:51 -05:00
mod.rs Rollup merge of #116750 - fintelia:seek_seek_relative, r=Mark-Simulacrum 2023-11-19 04:14:40 +09:00
prelude.rs Use heading for std::prelude and not io::prelude 2021-01-05 17:52:24 -08:00
stdio.rs Add more diagnostic items for clippy 2023-10-05 18:21:47 -04:00
tests.rs Limit read size in File::read_to_end loop 2023-04-21 20:54:12 +01:00
util.rs Replace version placeholders with 1.73.0 2023-08-22 06:57:00 -04:00