From b71df58f2fb4ed85d4c8cf806d5837ce63c73f31 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 22 Sep 2021 13:22:45 +0200 Subject: The great docs update --- macros/src/codegen/module.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'macros') diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 17bc34d..6011c9b 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -270,6 +270,7 @@ pub fn codegen( let m_ident = util::monotonic_ident(&monotonic_name); let m_isr = &monotonic.args.binds; let enum_ = util::interrupt_ident(); + let spawn_handle_string = format!("{}::SpawnHandle", m.to_string()); let (enable_interrupt, pend) = if &*m_isr.to_string() == "SysTick" { ( @@ -320,6 +321,12 @@ pub fn codegen( marker: u32, } + impl core::fmt::Debug for #internal_spawn_handle_ident { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_struct(#spawn_handle_string).finish() + } + } + #(#cfgs)* impl #internal_spawn_handle_ident { pub fn cancel(self) -> Result<#ty, ()> { -- cgit v1.2.3