Releases: andreacorbellini/rust-circular-buffer
v1.2.0
v1.1.0
New features
- Added
nth_front()andnth_back().
v1.0.0
New features
- When the buffer is full,
push_front()andpush_back()now return the replaced element (contributed by Zacchary Dempsey-Plante).
Other changes
- Increased the minimum supported rustc version to 1.82
v0.1.9
- This release does not introduce any new features or bug fixes. It only changes the dev-dependencies used by unit tests (contributed by Ben Beasley).
v0.1.8
New features
- Added optional support for
embedded-ioandembedded-io-async(contribyted by DaneSlattery).
Other changes
- Renamed the
use_stdcargo feature tostd(the olduse_stdis now an alias forstd, so this is not a breaking change).
v0.1.7
New features
-
Implemented the traits
Index<usize>andIndexMut<usize>forCircularBuffer. Now elements of the buffer can be accessed and modified with indexing operations (buf[index]), like in the following example:use circular_buffer::CircularBuffer; let mut buf = CircularBuffer::<5, char>::from(['a', 'b', 'c']); assert_eq!(buf[0], 'a'); buf[1] = 'd'; assert_eq!(buf[1], 'd');
-
Added new methods to fill the whole buffer, or the spare capacity of the buffer:
fill(),fill_with(),fill_spare(),fill_spare_with(). -
Added a new
allocfeature that brings heap-allocation features tono_stdenvironments through thealloccrate (contributed by Haoud). -
Implemented the
BufReadtrait forCircularBuffer(not available inno_stdenvironments).
Bug fixes
- Fixed an out-of-bounds read in
remove(). - Removed
#[must_use]fromdrain(): it is perfectly acceptable to ignore the return value from this method.
Other changes
- Raised the minimum rustc version to 1.65
Crate: https://crates.io/crates/circular-buffer/0.1.7
Documentation: https://docs.rs/circular-buffer/0.1.7/circular_buffer/index.html
v0.1.6
- Fixed a bug in bug in bug in the
PartialEqimplementation that would lead to a panic in some circumstances.
Crate: https://crates.io/crates/circular-buffer/0.1.6
Documentation: https://docs.rs/circular-buffer/0.1.6/circular_buffer/index.html
v0.1.5
- Added
try_push_back()andtry_push_front()as non-overwriting alternatives topush_back()andpush_front()(contributed by Rinat Shigapov in GH-5). - Added
drain()to remove ranges of elements. - Added
make_contiguous()to return a contiguous mutable slice of elements. IterandIterMutnow implement theDefaulttrait.
Crate: https://crates.io/crates/circular-buffer/0.1.5
Documentation: https://docs.rs/circular-buffer/0.1.5/circular_buffer/index.html
v0.1.4
- Fixed a bug in
range()andrange_mut()that made them return more elements than requested in some circumstances.
Crate: https://crates.io/crates/circular-buffer/0.1.4
Documentation: https://docs.rs/circular-buffer/0.1.4/circular_buffer/index.html
v0.1.3
- Fixed
range()andrange_mut()when passing an empty range (contributed by Icxolu in GH-4).
Crate: https://crates.io/crates/circular-buffer/0.1.3
Documentation: https://docs.rs/circular-buffer/0.1.3/circular_buffer/index.html