Skip to content

Commit

Permalink
fix(stream): Refer to correct stream on panic
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Nov 4, 2024
1 parent 69cf6c9 commit 0b8d105
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/anstream/src/_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(_) => {}
}
Expand Down Expand Up @@ -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(_) => {}
}
Expand Down

0 comments on commit 0b8d105

Please sign in to comment.