From 56efe5c3b0b569e93a470e470250919956f3a003 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 2 May 2021 23:56:34 +0100 Subject: [PATCH] Provide DebugExt::to_debug Signed-off-by: Ian Jackson --- base/misc.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/base/misc.rs b/base/misc.rs index c6bbe061..faa47bc4 100644 --- a/base/misc.rs +++ b/base/misc.rs @@ -84,3 +84,8 @@ macro_rules! if_let { }; }; } + +#[ext(pub, name=DebugExt)] +impl T { + fn to_debug(&self) -> String { format!("{:?}", self) } +} -- 2.30.2