mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 06:22:00 +00:00
Rollup merge of #123817 - slanterns:seek_relative, r=dtolnay
Stabilize `seek_seek_relative` This PR stabilizes `seek_seek_relative`: ```rust // std::io::Seek trait Seek { fn seek_relative(&mut self, offset: i64) -> Result<()>; } ``` <br> Tracking issue: https://github.com/rust-lang/rust/issues/117374. Implementation PR: https://github.com/rust-lang/rust/pull/116750. FCPs already completed in the tracking issue. Closes https://github.com/rust-lang/rust/issues/117374. r? libs-api
This commit is contained in:
commit
b0cbd4e5f3
@ -2044,7 +2044,6 @@ pub trait Seek {
|
|||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```no_run
|
/// ```no_run
|
||||||
/// #![feature(seek_seek_relative)]
|
|
||||||
/// use std::{
|
/// use std::{
|
||||||
/// io::{self, Seek},
|
/// io::{self, Seek},
|
||||||
/// fs::File,
|
/// fs::File,
|
||||||
@ -2059,7 +2058,7 @@ pub trait Seek {
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// [`BufReader`]: crate::io::BufReader
|
/// [`BufReader`]: crate::io::BufReader
|
||||||
#[unstable(feature = "seek_seek_relative", issue = "117374")]
|
#[stable(feature = "seek_seek_relative", since = "CURRENT_RUSTC_VERSION")]
|
||||||
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))?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user