From 9638dc0a660c166ae9f445fcb17c3a3094275688 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 25 Jul 2023 21:03:04 -0700 Subject: [PATCH] Fix perror --- native/src/base/xwrap.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/src/base/xwrap.rs b/native/src/base/xwrap.rs index 5ca25b27e..77139d2ed 100644 --- a/native/src/base/xwrap.rs +++ b/native/src/base/xwrap.rs @@ -38,13 +38,13 @@ macro_rules! perror { ($fmt:expr) => { $crate::log_with_formatter($crate::ffi::LogLevel::ErrorCxx, |w| { w.write_str($fmt)?; - w.write_fmt(format_args!(" failed with {}: {}", $crate::errno(), error_str())) + w.write_fmt(format_args_nl!(" failed with {}: {}", $crate::errno(), error_str())) }) }; ($fmt:expr, $($args:tt)*) => { $crate::log_with_formatter($crate::ffi::LogLevel::ErrorCxx, |w| { w.write_fmt(format_args!($fmt, $($args)*))?; - w.write_fmt(format_args!(" failed with {}: {}", $crate::errno(), error_str())) + w.write_fmt(format_args_nl!(" failed with {}: {}", $crate::errno(), error_str())) }) }; }