From 7178f0854151759d2b3c147a418d454411c223ed Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Mon, 17 Mar 2025 20:49:54 +0100 Subject: rtic-sync: add comment about why we don't `return_free_slot` --- rtic-sync/src/channel.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rtic-sync') diff --git a/rtic-sync/src/channel.rs b/rtic-sync/src/channel.rs index 3706e58..3bd7b92 100644 --- a/rtic-sync/src/channel.rs +++ b/rtic-sync/src/channel.rs @@ -128,6 +128,9 @@ impl Channel { core::ptr::read(ptr) }; + // NOTE: do not `return_free_slot`, as we have mutable + // access to this `Channel` and no `Receiver` or `Sender` + // exist. assert!(!self.inner.freeq.as_mut().is_full()); unsafe { // SAFETY: `freeq` is not ful. -- cgit v1.2.3