/// fn main() -> std::io::Result<()> {
/// let mut buffer = BufWriter::new(File::create("foo.txt")?);
///
- /// buffer.write(b"some bytes")?;
+ /// buffer.write_all(b"some bytes")?;
/// buffer.flush()?;
/// Ok(())
/// }
/// use std::io::{self, Write};
///
/// fn main() -> io::Result<()> {
-/// io::stdout().write(b"hello world")?;
+/// io::stdout().write_all(b"hello world")?;
///
/// Ok(())
/// }
/// let stdout = io::stdout();
/// let mut handle = stdout.lock();
///
-/// handle.write(b"hello world")?;
+/// handle.write_all(b"hello world")?;
///
/// Ok(())
/// }
/// let stdout = io::stdout();
/// let mut handle = stdout.lock();
///
- /// handle.write(b"hello world")?;
+ /// handle.write_all(b"hello world")?;
///
/// Ok(())
/// }
/// use std::io::{self, Write};
///
/// fn main() -> io::Result<()> {
-/// io::stderr().write(b"hello world")?;
+/// io::stderr().write_all(b"hello world")?;
///
/// Ok(())
/// }
/// let stderr = io::stderr();
/// let mut handle = stderr.lock();
///
-/// handle.write(b"hello world")?;
+/// handle.write_all(b"hello world")?;
///
/// Ok(())
/// }
/// let stderr = io::stderr();
/// let mut handle = stderr.lock();
///
- /// handle.write(b"hello world")?;
+ /// handle.write_all(b"hello world")?;
///
/// Ok(())
/// }