From 9c11827d7cc94a110a41b26ad78e0c9aad030b5b Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 25 Jan 2021 19:26:53 +0000 Subject: [PATCH] utils: Improve display_as_debug! so it can pass generic params Signed-off-by: Ian Jackson --- src/error.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/error.rs b/src/error.rs index 676acb65..22d9f97e 100644 --- a/src/error.rs +++ b/src/error.rs @@ -181,8 +181,8 @@ impl IdForById for PieceId { #[macro_export] macro_rules! display_as_debug { - {$x:ty} => { - impl std::fmt::Display for $x { + {$x:ty $( , $($gen_tt:tt)* )?} => { + impl $( $($gen_tt)* )? std::fmt::Display for $x { #[throws(std::fmt::Error)] fn fmt(&self, f: &mut std::fmt::Formatter) { ::fmt(self, f)? -- 2.30.2