From 0b8d1052cd3b88944a51b8c597e68bb452e7dd34 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 4 Nov 2024 11:31:53 -0600 Subject: [PATCH] fix(stream): Refer to correct stream on panic --- crates/anstream/src/_macros.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/anstream/src/_macros.rs b/crates/anstream/src/_macros.rs index 76ae7d7..119912e 100644 --- a/crates/anstream/src/_macros.rs +++ b/crates/anstream/src/_macros.rs @@ -193,7 +193,7 @@ macro_rules! eprint { let mut stream = $crate::stderr(); match ::std::write!(&mut stream, $($arg)*) { Err(e) if e.kind() != ::std::io::ErrorKind::BrokenPipe => { - ::std::panic!("failed printing to stdout: {e}"); + ::std::panic!("failed printing to stderr: {e}"); } Err(_) | Ok(_) => {} } @@ -247,7 +247,7 @@ macro_rules! eprintln { let mut stream = $crate::stderr(); match ::std::writeln!(&mut stream, $($arg)*) { Err(e) if e.kind() != ::std::io::ErrorKind::BrokenPipe => { - ::std::panic!("failed printing to stdout: {e}"); + ::std::panic!("failed printing to stderr: {e}"); } Err(_) | Ok(_) => {} }