From 5701bf4968efea55d767cf60523e24d26d0c79ad Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 17 Jan 2021 17:02:40 +0800 Subject: [PATCH] add debug attributes back in --- services/gam/src/api.rs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/services/gam/src/api.rs b/services/gam/src/api.rs index 37d81ec2a..82a6b703a 100644 --- a/services/gam/src/api.rs +++ b/services/gam/src/api.rs @@ -50,7 +50,15 @@ pub struct TextView<'a> { canvas: [u32; 4], // GID of the canvas to draw on } -//#[derive(Debug)] +impl<'a> core::fmt::Debug for TextView<'a> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + // this should definitely be extended to print more relevant data, but for now just render the string itself + write!(f, "{}", self.text) + } +} + + +#[derive(Debug)] pub enum Opcode<'a> { // clears a canvas with a given GID ClearCanvas([u32; 4]),