From 3aca69751181944dd23ef65c1a0af5d5f3b7208f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Thu, 26 Nov 2020 20:56:38 +0200 Subject: Simplify error formatting --- crates/mbe/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/mbe') diff --git a/crates/mbe/src/lib.rs b/crates/mbe/src/lib.rs index 844e5a117..2d0763c47 100644 --- a/crates/mbe/src/lib.rs +++ b/crates/mbe/src/lib.rs @@ -52,7 +52,7 @@ impl fmt::Display for ExpandError { ExpandError::BindingError(e) => f.write_str(e), ExpandError::ConversionError => f.write_str("could not convert tokens"), ExpandError::InvalidRepeat => f.write_str("invalid repeat expression"), - ExpandError::ProcMacroError(e) => write!(f, "{}", e), + ExpandError::ProcMacroError(e) => e.fmt(f), ExpandError::Other(e) => f.write_str(e), } } -- cgit v1.2.3