bors[bot] d2beff0cef Merge #45
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>
2018-07-13 04:56:38 +00:00
2018-04-23 20:31:51 +02:00
2018-07-13 04:56:38 +00:00
2018-06-19 23:29:14 -05:00
2018-03-01 19:12:13 +01:00
2018-05-04 10:18:17 +02:00
2018-05-04 10:18:17 +02:00
2017-03-05 00:30:10 -05:00
2017-03-05 00:30:10 -05:00
2018-04-23 19:54:46 +02:00

crates.io crates.io

heapless

static friendly data structures that don't require dynamic memory allocation

Documentation

Change log

License

Licensed under either of

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
Heapless, static friendly data structures
Readme 18 MiB
Languages
Rust 100%