Rollup merge of #65478 - RalfJung:write, r=jonas-schievink

fmt::Write is about string slices, not byte slices

No idea why the docs talk about bytes, maybe a copy-paste error?
This commit is contained in:
Mazdak Farrokhzad
2019-10-17 13:46:13 +02:00
committed by GitHub

View File

@@ -108,10 +108,10 @@ pub struct Error;
/// [`io::Write`]: ../../std/io/trait.Write.html /// [`io::Write`]: ../../std/io/trait.Write.html
#[stable(feature = "rust1", since = "1.0.0")] #[stable(feature = "rust1", since = "1.0.0")]
pub trait Write { pub trait Write {
/// Writes a slice of bytes into this writer, returning whether the write /// Writes a string slice into this writer, returning whether the write
/// succeeded. /// succeeded.
/// ///
/// This method can only succeed if the entire byte slice was successfully /// This method can only succeed if the entire string slice was successfully
/// written, and this method will not return until all data has been /// written, and this method will not return until all data has been
/// written or an error occurs. /// written or an error occurs.
/// ///