Skip to content

Commit d9f7c9d

Browse files
committed
Improve documentation
1 parent bc058b6 commit d9f7c9d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

library/std/src/io/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -1960,7 +1960,9 @@ pub trait Seek {
19601960

19611961
/// Seeks relative to the current position.
19621962
///
1963-
/// This is equivalent to `self.seek(SeekFrom::Current(offset))`.
1963+
/// This is equivalent to `self.seek(SeekFrom::Current(offset))` but
1964+
/// doesn't return the new position which can allow some implementations
1965+
/// such as [`BufReader`] to perform more efficient seeks.
19641966
///
19651967
/// # Example
19661968
///
@@ -1978,6 +1980,8 @@ pub trait Seek {
19781980
/// Ok(())
19791981
/// }
19801982
/// ```
1983+
///
1984+
/// [`BufReader`]: crate::io::BufReader
19811985
#[unstable(feature = "seek_seek_relative", issue = "117374")]
19821986
fn seek_relative(&mut self, offset: i64) -> Result<()> {
19831987
self.seek(SeekFrom::Current(offset))?;

0 commit comments

Comments
 (0)