From 81f962f437c2e1164655cf45f43ea464540fcb11 Mon Sep 17 00:00:00 2001 From: debris Date: Tue, 26 Feb 2019 17:50:38 +0100 Subject: [PATCH] panic_hook module uses eprintln instead of raw stderr interface --- util/panic-hook/src/lib.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/util/panic-hook/src/lib.rs b/util/panic-hook/src/lib.rs index f49fea67b8d..03501a47fd6 100644 --- a/util/panic-hook/src/lib.rs +++ b/util/panic-hook/src/lib.rs @@ -18,7 +18,6 @@ extern crate backtrace; -use std::io::{self, Write}; use std::panic::{self, PanicInfo}; use std::thread; use std::process; @@ -27,7 +26,7 @@ use backtrace::Backtrace; /// Set the panic hook to write to stderr and abort the process when a panic happens. pub fn set_abort() { set_with(|msg| { - let _ = io::stderr().write_all(msg.as_bytes()); + eprintln!("{}", msg); process::abort() }); }