@@ -323,7 +323,6 @@ impl<W: Write> BufWriter<W> {
323
323
/// # Examples
324
324
///
325
325
/// ```
326
- /// #![feature(bufwriter_into_parts)]
327
326
/// use std::io::{BufWriter, Write};
328
327
///
329
328
/// let mut buffer = [0u8; 10];
@@ -334,7 +333,7 @@ impl<W: Write> BufWriter<W> {
334
333
/// assert_eq!(recovered_writer.len(), 0);
335
334
/// assert_eq!(&buffered_data.unwrap(), b"ata");
336
335
/// ```
337
- #[ unstable ( feature = "bufwriter_into_parts" , issue = "80690 " ) ]
336
+ #[ stable ( feature = "bufwriter_into_parts" , since = "1.56.0 " ) ]
338
337
pub fn into_parts ( mut self ) -> ( W , Result < Vec < u8 > , WriterPanicked > ) {
339
338
let buf = mem:: take ( & mut self . buf ) ;
340
339
let buf = if !self . panicked { Ok ( buf) } else { Err ( WriterPanicked { buf } ) } ;
@@ -444,14 +443,13 @@ impl<W: Write> BufWriter<W> {
444
443
}
445
444
}
446
445
447
- #[ unstable ( feature = "bufwriter_into_parts" , issue = "80690 " ) ]
446
+ #[ stable ( feature = "bufwriter_into_parts" , since = "1.56.0 " ) ]
448
447
/// Error returned for the buffered data from `BufWriter::into_parts`, when the underlying
449
448
/// writer has previously panicked. Contains the (possibly partly written) buffered data.
450
449
///
451
450
/// # Example
452
451
///
453
452
/// ```
454
- /// #![feature(bufwriter_into_parts)]
455
453
/// use std::io::{self, BufWriter, Write};
456
454
/// use std::panic::{catch_unwind, AssertUnwindSafe};
457
455
///
@@ -478,7 +476,7 @@ pub struct WriterPanicked {
478
476
impl WriterPanicked {
479
477
/// Returns the perhaps-unwritten data. Some of this data may have been written by the
480
478
/// panicking call(s) to the underlying writer, so simply writing it again is not a good idea.
481
- #[ unstable ( feature = "bufwriter_into_parts" , issue = "80690 " ) ]
479
+ #[ stable ( feature = "bufwriter_into_parts" , since = "1.56.0 " ) ]
482
480
pub fn into_inner ( self ) -> Vec < u8 > {
483
481
self . buf
484
482
}
@@ -487,22 +485,22 @@ impl WriterPanicked {
487
485
"BufWriter inner writer panicked, what data remains unwritten is not known" ;
488
486
}
489
487
490
- #[ unstable ( feature = "bufwriter_into_parts" , issue = "80690 " ) ]
488
+ #[ stable ( feature = "bufwriter_into_parts" , since = "1.56.0 " ) ]
491
489
impl error:: Error for WriterPanicked {
492
490
#[ allow( deprecated, deprecated_in_future) ]
493
491
fn description ( & self ) -> & str {
494
492
Self :: DESCRIPTION
495
493
}
496
494
}
497
495
498
- #[ unstable ( feature = "bufwriter_into_parts" , issue = "80690 " ) ]
496
+ #[ stable ( feature = "bufwriter_into_parts" , since = "1.56.0 " ) ]
499
497
impl fmt:: Display for WriterPanicked {
500
498
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
501
499
write ! ( f, "{}" , Self :: DESCRIPTION )
502
500
}
503
501
}
504
502
505
- #[ unstable ( feature = "bufwriter_into_parts" , issue = "80690 " ) ]
503
+ #[ stable ( feature = "bufwriter_into_parts" , since = "1.56.0 " ) ]
506
504
impl fmt:: Debug for WriterPanicked {
507
505
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
508
506
f. debug_struct ( "WriterPanicked" )
0 commit comments