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