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>
#![feature(conservative_impl_trait)] has been stabelized in Rust 1.26, #![deny(warnings)] would therefore break the build when a stable feature is explicitly used