File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1736,7 +1736,6 @@ pub trait Seek {
17361736 /// # Example
17371737 ///
17381738 /// ```no_run
1739- /// #![feature(seek_rewind)]
17401739 /// use std::io::{Read, Seek, Write};
17411740 /// use std::fs::OpenOptions;
17421741 ///
@@ -1754,7 +1753,7 @@ pub trait Seek {
17541753 /// f.read_to_string(&mut buf).unwrap();
17551754 /// assert_eq!(&buf, hello);
17561755 /// ```
1757- #[ unstable ( feature = "seek_rewind" , issue = "85149 " ) ]
1756+ #[ stable ( feature = "seek_rewind" , since = "1.55.0 " ) ]
17581757 fn rewind ( & mut self ) -> Result < ( ) > {
17591758 self . seek ( SeekFrom :: Start ( 0 ) ) ?;
17601759 Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -336,6 +336,10 @@ fn seek_position() -> io::Result<()> {
336336 assert_eq ! ( c. stream_position( ) ?, 8 ) ;
337337 assert_eq ! ( c. stream_position( ) ?, 8 ) ;
338338
339+ c. rewind ( ) ?;
340+ assert_eq ! ( c. stream_position( ) ?, 0 ) ;
341+ assert_eq ! ( c. stream_position( ) ?, 0 ) ;
342+
339343 Ok ( ( ) )
340344}
341345
You can’t perform that action at this time.
0 commit comments