mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-27 12:30:35 +00:00
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:
parent
6a8fa3a475
commit
8b320e64e7
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user