Derive the clone trait for the OrderedIter making it easy for users to use an iterator on a History Buffer more than once.

This commit is contained in:
Donny Zimmanck 2021-11-12 12:54:53 -08:00
parent 6a8fa3a475
commit 8b320e64e7

View File

@ -272,6 +272,7 @@ impl<T, const N: usize> Default for HistoryBuffer<T, N> {
}
}
#[derive(Clone)]
pub struct OrderedIter<'a, T, const N: usize> {
buf: &'a HistoryBuffer<T, N>,
cur: usize,