fix: remove unnecessary let binding in defmt-only logging macros#749
Conversation
There was a problem hiding this comment.
Pull request overview
This PR reduces stack usage on embedded targets by removing an unnecessary local tuple binding from the defmt-only logging macro wrappers, addressing a suspected copy/paste artifact that inflated per-call stack frames.
Changes:
- Remove
let _ = (...)fromtrace!/debug!/info!/warn!/error!wrappers in the defmt-only logging module. - Keep the actual
::defmt::*invocations unchanged to preserve logging behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
These were originally added to fix |
A suspected copy-pasted line in a logging macro made each log call slightly bigger, and 45 of them inside one async function added up to enough extra stack usage to silently overwrite battery data on a memory-constrained microcontroller.