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