aboutsummaryrefslogtreecommitdiff
path: root/src/io/stderr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/io/stderr.rs')
-rw-r--r--src/io/stderr.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/io/stderr.rs b/src/io/stderr.rs
index 99607dc..2f624fb 100644
--- a/src/io/stderr.rs
+++ b/src/io/stderr.rs
@@ -1,4 +1,5 @@
use crate::io::blocking::Blocking;
+use crate::io::stdio_common::SplitByUtf8BoundaryIfWindows;
use crate::io::AsyncWrite;
use std::io;
@@ -35,7 +36,7 @@ cfg_io_std! {
/// ```
#[derive(Debug)]
pub struct Stderr {
- std: Blocking<std::io::Stderr>,
+ std: SplitByUtf8BoundaryIfWindows<Blocking<std::io::Stderr>>,
}
/// Constructs a new handle to the standard error of the current process.
@@ -59,7 +60,7 @@ cfg_io_std! {
///
/// #[tokio::main]
/// async fn main() -> io::Result<()> {
- /// let mut stderr = io::stdout();
+ /// let mut stderr = io::stderr();
/// stderr.write_all(b"Print some error here.").await?;
/// Ok(())
/// }
@@ -67,7 +68,7 @@ cfg_io_std! {
pub fn stderr() -> Stderr {
let std = io::stderr();
Stderr {
- std: Blocking::new(std),
+ std: SplitByUtf8BoundaryIfWindows::new(Blocking::new(std)),
}
}
}