diff options
| author | Jonathan Behrens <fintelia@gmail.com> | 2023-11-04 15:45:55 -0700 |
|---|---|---|
| committer | Jonathan Behrens <fintelia@gmail.com> | 2023-11-04 15:45:55 -0700 |
| commit | d9f7c9db02c023adfeba554971abbf11bb244994 (patch) | |
| tree | 98e0be67eed957626a635c4827f9a9e22d28cdae | |
| parent | bc058b6f45191a9c5af37856c3f5a4d4b2efec77 (diff) | |
| download | rust-d9f7c9db02c023adfeba554971abbf11bb244994.tar.gz rust-d9f7c9db02c023adfeba554971abbf11bb244994.zip | |
Improve documentation
| -rw-r--r-- | library/std/src/io/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs index 9ee68a079bc..bd6a989ee96 100644 --- a/library/std/src/io/mod.rs +++ b/library/std/src/io/mod.rs @@ -1960,7 +1960,9 @@ pub trait Seek { /// Seeks relative to the current position. /// - /// This is equivalent to `self.seek(SeekFrom::Current(offset))`. + /// This is equivalent to `self.seek(SeekFrom::Current(offset))` but + /// doesn't return the new position which can allow some implementations + /// such as [`BufReader`] to perform more efficient seeks. /// /// # Example /// @@ -1978,6 +1980,8 @@ pub trait Seek { /// Ok(()) /// } /// ``` + /// + /// [`BufReader`]: crate::io::BufReader #[unstable(feature = "seek_seek_relative", issue = "117374")] fn seek_relative(&mut self, offset: i64) -> Result<()> { self.seek(SeekFrom::Current(offset))?; |
