Improve documentation

This commit is contained in:
Jonathan Behrens 2023-11-04 15:45:55 -07:00
parent bc058b6f45
commit d9f7c9db02

View File

@ -1960,7 +1960,9 @@ pub trait Seek {
/// Seeks relative to the current position. /// 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 /// # Example
/// ///
@ -1978,6 +1980,8 @@ pub trait Seek {
/// Ok(()) /// Ok(())
/// } /// }
/// ``` /// ```
///
/// [`BufReader`]: crate::io::BufReader
#[unstable(feature = "seek_seek_relative", issue = "117374")] #[unstable(feature = "seek_seek_relative", issue = "117374")]
fn seek_relative(&mut self, offset: i64) -> Result<()> { fn seek_relative(&mut self, offset: i64) -> Result<()> {
self.seek(SeekFrom::Current(offset))?; self.seek(SeekFrom::Current(offset))?;