You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uses a static mut. It goes to some trouble to ensure that the handle() function cannot be called twice, but perhaps we can use the type system to guarantee that is the case. Or if not, maybe we should use an UnsafeCell.
Also, the buffer is placed in an uninit section but we don't use the MaybeUninit type for the buffer. If there's a reason, we should perhaps explain why.
The text was updated successfully, but these errors were encountered:
Also, the buffer is placed in an uninit section but we don't use the MaybeUninit type for the buffer. If there's a reason, we should perhaps explain why.
I was just about to file an issue about that. In the commit that introduced the uninit section in cortex-m-rt it says that MaybeUninit is the only correct way to use that section 1.
The code at
defmt/firmware/defmt-rtt/src/lib.rs
Line 140 in 4db33ca
static mut
. It goes to some trouble to ensure that thehandle()
function cannot be called twice, but perhaps we can use the type system to guarantee that is the case. Or if not, maybe we should use anUnsafeCell
.Also, the buffer is placed in an
uninit
section but we don't use theMaybeUninit
type for the buffer. If there's a reason, we should perhaps explain why.The text was updated successfully, but these errors were encountered: