From 437759c40de8b57854eebd664833a2f2e55f5a0f Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Mon, 19 Aug 2024 11:47:15 +0100 Subject: [PATCH] Use write_str --- src/errors.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/errors.rs b/src/errors.rs index f50cece..52e450f 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -130,7 +130,7 @@ macro_rules! ascom_error_codes { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match *self { $( - Self::$name => write!(f, "{}", stringify!($name)), + Self::$name => f.write_str(stringify!($name)), )* _ => match self.as_driver_error() { Ok(driver_code) => write!(f, "DRIVER_ERROR[{driver_code}]"),