From 3cbcf7b7e4c3f6e31ec28c1c248f7d000615bba4 Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Wed, 12 Oct 2022 15:34:45 +0200 Subject: [PATCH] xous-rs: Implement Display instead of Into Signed-off-by: Jean-Pierre De Jesus DIAZ --- xous-rs/src/arch/hosted/process.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/xous-rs/src/arch/hosted/process.rs b/xous-rs/src/arch/hosted/process.rs index 66cd3e5a5..6db522985 100644 --- a/xous-rs/src/arch/hosted/process.rs +++ b/xous-rs/src/arch/hosted/process.rs @@ -12,13 +12,13 @@ impl ProcessKey { } } -impl Into for ProcessKey { - fn into(self) -> String { - let mut out = String::new(); +impl core::fmt::Display for ProcessKey { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { for i in self.0 { - out.push_str(&format!("{:02x}", i)); + write!(f, "{:02x}", i)?; } - out + + Ok(()) } }