mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-28 21:10:28 +00:00
![bors[bot]](/assets/img/avatar_default.png)
26: Ringbuffer iterators macro r=japaric a=XOSplicer Resolves #6 Refactor the ring_buffer::{Iter,IterMut} implementations to use a macro, so there is less duplicate code. Inspired by the[ slice iterator macro in lib core](https://github.com/rust-lang/rust/blob/master/src/libcore/slice/mod.rs). I have never worked with macros to generate const / mut implementations. So this might be a little rough. `#![allow(stable_features)]` is needed for current rust nightly, since otherwise `conservative_impl_trait` would throw a warning. Removing the feature flag would not be backwards compatible with earlier nightly versions. Co-authored-by: Felix <stegmaier.felix@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%