We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc058b6 commit d9f7c9dCopy full SHA for d9f7c9d
library/std/src/io/mod.rs
@@ -1960,7 +1960,9 @@ pub trait Seek {
1960
1961
/// Seeks relative to the current position.
1962
///
1963
- /// This is equivalent to `self.seek(SeekFrom::Current(offset))`.
+ /// 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.
1966
1967
/// # Example
1968
@@ -1978,6 +1980,8 @@ pub trait Seek {
1978
1980
/// Ok(())
1979
1981
/// }
1982
/// ```
1983
+ ///
1984
+ /// [`BufReader`]: crate::io::BufReader
1985
#[unstable(feature = "seek_seek_relative", issue = "117374")]
1986
fn seek_relative(&mut self, offset: i64) -> Result<()> {
1987
self.seek(SeekFrom::Current(offset))?;
0 commit comments