about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--library/std/src/io/mod.rs6
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))?;