heapless
heapless copied to clipboard
Heapless, `static` friendly data structures
Hi, I made a somewhat broken migration of a non-thread-safe SPSC to a thread-safe one looking at the SPSC implementation here for guidance. I [came over this part of the...
In the initial implementation, I implemented `Drop` for `Vec` but I implemented it as a `no-op` for `VecView`, thinking that it should only be dropped through `Vec`. This is incorrect,...
After updating `heapless` to 0.8 in my project (as a transitive dependency of `usb-device` 0.3.2), it fails to build with: ``` error[E0599]: no method named `fetch_add` found for struct `AtomicUsize`...
Fixes https://github.com/rust-embedded/heapless/issues/461.
I'm using heapless-0.8.0 with the feature `mpmc_large`. Instances of MpMcQueue with N >= 256 can be constructed and appear to work correctly, but I think I found an edge case:...
Most likely the compiler already inlines the function calls, but afaik adding the annotation makes it more likely. I could not build it locally due to: ``` Compiling heapless v0.8.0...
- [x] Rework re-exports in lib.rs https://github.com/rust-embedded/heapless/pull/490#issuecomment-2200015830 - [x] Rename `Deque::storage_len` to `len`: https://github.com/rust-embedded/heapless/pull/490#issue-2383361459 - [ ] Remove the `Storage` generic on `history_buf::OldestOrdered`. The view version can become the version...
This would enable using `String` as a key in one of the map or set types in this crate. I see no reason as to why that would not be...
It could very well implement it, since there is already [`IterMut`](https://docs.rs/heapless/latest/heapless/struct.LinearMap.html#method.iter_mut)
The `MpMcQueue` drop implementation is not optimized, as it uses the normal `dequeue` method, which assumes a shared reference and prevents race condition. `drop` gives us a mutable reference, which...