From c4febcd77389f4d5f4a02ae09bda83146acbd812 Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Wed, 29 Jul 2020 09:25:46 +0200 Subject: [PATCH] http_err macro: imply format!() Signed-off-by: Wolfgang Bumiller --- proxmox/src/api/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox/src/api/error.rs b/proxmox/src/api/error.rs index 221dcf77..d152a250 100644 --- a/proxmox/src/api/error.rs +++ b/proxmox/src/api/error.rs @@ -27,10 +27,10 @@ impl fmt::Display for HttpError { /// Macro to create a HttpError inside a anyhow::Error #[macro_export] macro_rules! http_err { - ($status:ident, $msg:expr) => {{ + ($status:ident, $($fmt:tt)+) => {{ ::anyhow::Error::from($crate::api::error::HttpError::new( $crate::api::error::StatusCode::$status, - $msg, + format!($($fmt)+) )) }}; }