Rollup merge of #86794 - inquisitivecrystal:seek-rewind, r=m-ou-se
Stabilize `Seek::rewind()` This stabilizes `Seek::rewind`. It seemed to fit into one of the existing tests, so I extended that test rather than adding a new one. Closes #85149.
This commit is contained in:
commit
2bc7d4d70a
2 changed files with 5 additions and 2 deletions
|
@ -1759,7 +1759,6 @@ pub trait Seek {
|
|||
/// # Example
|
||||
///
|
||||
/// ```no_run
|
||||
/// #![feature(seek_rewind)]
|
||||
/// use std::io::{Read, Seek, Write};
|
||||
/// use std::fs::OpenOptions;
|
||||
///
|
||||
|
@ -1777,7 +1776,7 @@ pub trait Seek {
|
|||
/// f.read_to_string(&mut buf).unwrap();
|
||||
/// assert_eq!(&buf, hello);
|
||||
/// ```
|
||||
#[unstable(feature = "seek_rewind", issue = "85149")]
|
||||
#[stable(feature = "seek_rewind", since = "1.55.0")]
|
||||
fn rewind(&mut self) -> Result<()> {
|
||||
self.seek(SeekFrom::Start(0))?;
|
||||
Ok(())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue