From b6efb154883d6b65c306131bd531d54308ff9046 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 17 Jan 2021 17:00:57 +0800 Subject: [PATCH] add debug trait to xous-string --- xous-rs/src/string.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xous-rs/src/string.rs b/xous-rs/src/string.rs index 9049add34..ababbb082 100644 --- a/xous-rs/src/string.rs +++ b/xous-rs/src/string.rs @@ -119,3 +119,9 @@ impl<'a> core::fmt::Write for String<'a> { Ok(()) } } + +impl<'a> core::fmt::Debug for String<'a> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.s) + } +}