From e893d31f9be9c868f9793a0d7878d3bd93db40e5 Mon Sep 17 00:00:00 2001 From: Jacob Pratt Date: Mon, 13 Jun 2022 18:33:19 -0400 Subject: [PATCH] Avoid unnecessary call to `format!` --- src/error/format.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/error/format.rs b/src/error/format.rs index 23c4979f9..24df98210 100644 --- a/src/error/format.rs +++ b/src/error/format.rs @@ -91,6 +91,6 @@ impl Format { #[doc(hidden)] // Exposed only for the `declare_format_string` macro pub fn into_invalid_serde_value(self) -> S::Error { use serde::ser::Error; - S::Error::custom(format!("{}", self)) + S::Error::custom(self) } }