Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fintelia committed Nov 4, 2023
1 parent bc058b6 commit d9f7c9d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion library/std/src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand All @@ -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))?;
Expand Down

0 comments on commit d9f7c9d

Please sign in to comment.