mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-30 14:00:29 +00:00
![bors[bot]](/assets/img/avatar_default.png)
45: Fix incorrect length calculation for RingBuffer when head > tail r=japaric a=ReeceStevens When the head index becomes greater than the tail, the `len()` function returns the incorrect length. This causes iterations over ring buffers to stop early as well, since they use the same calculation. This PR adds two (very minimal) tests that demonstrate the error. Co-authored-by: Reece Stevens <reecestevens24@gmail.com>
heapless
static
friendly data structures that don't require dynamic memory allocation
Documentation
Change log
License
Licensed under either of
-
Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
-
MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Description
Languages
Rust
100%