rust/library/std
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
..
benches mv std libs to library/ 2020-07-27 19:51:13 -05:00
src Rollup merge of #116750 - fintelia:seek_seek_relative, r=Mark-Simulacrum 2023-11-19 04:14:40 +09:00
tests Move RandomState and DefaultHasher into std::hash, but don't export for now 2023-11-02 20:35:20 -04:00
build.rs Remove asmjs from library 2023-10-28 23:10:45 -07:00
Cargo.toml libc: bump dependency to 0.2.150 2023-11-05 18:32:10 +01:00