mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-27 04:20:24 +00:00
feat: implement Debug
for Deque
This commit is contained in:
parent
59bc89f297
commit
9c0c565178
@ -1,3 +1,4 @@
|
||||
use core::fmt;
|
||||
use core::iter::FusedIterator;
|
||||
use core::marker::PhantomData;
|
||||
use core::mem::MaybeUninit;
|
||||
@ -374,6 +375,12 @@ impl<T, const N: usize> Drop for Deque<T, N> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: fmt::Debug, const N: usize> fmt::Debug for Deque<T, N> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
f.debug_list().entries(self).finish()
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator that moves out of a [`Deque`].
|
||||
///
|
||||
/// This struct is created by calling the `into_iter` method.
|
||||
|
Loading…
x
Reference in New Issue
Block a user