File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1736,7 +1736,6 @@ pub trait Seek {
1736
1736
/// # Example
1737
1737
///
1738
1738
/// ```no_run
1739
- /// #![feature(seek_rewind)]
1740
1739
/// use std::io::{Read, Seek, Write};
1741
1740
/// use std::fs::OpenOptions;
1742
1741
///
@@ -1754,7 +1753,7 @@ pub trait Seek {
1754
1753
/// f.read_to_string(&mut buf).unwrap();
1755
1754
/// assert_eq!(&buf, hello);
1756
1755
/// ```
1757
- #[ unstable ( feature = "seek_rewind" , issue = "85149 " ) ]
1756
+ #[ stable ( feature = "seek_rewind" , since = "1.55.0 " ) ]
1758
1757
fn rewind ( & mut self ) -> Result < ( ) > {
1759
1758
self . seek ( SeekFrom :: Start ( 0 ) ) ?;
1760
1759
Ok ( ( ) )
Original file line number Diff line number Diff line change @@ -336,6 +336,10 @@ fn seek_position() -> io::Result<()> {
336
336
assert_eq ! ( c. stream_position( ) ?, 8 ) ;
337
337
assert_eq ! ( c. stream_position( ) ?, 8 ) ;
338
338
339
+ c. rewind ( ) ?;
340
+ assert_eq ! ( c. stream_position( ) ?, 0 ) ;
341
+ assert_eq ! ( c. stream_position( ) ?, 0 ) ;
342
+
339
343
Ok ( ( ) )
340
344
}
341
345
You can’t perform that action at this time.
0 commit comments