mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-28 13:00:26 +00:00
Implement Debug for Queue
This commit is contained in:
parent
e2fcad0d1e
commit
252ce94d44
@ -2,7 +2,7 @@
|
||||
|
||||
use core::cell::UnsafeCell;
|
||||
use core::marker::PhantomData;
|
||||
use core::ptr;
|
||||
use core::{ptr, fmt};
|
||||
|
||||
use generic_array::{ArrayLength, GenericArray};
|
||||
|
||||
@ -216,6 +216,18 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, N, U, C> fmt::Debug for Queue<T, N, U, C>
|
||||
where
|
||||
N: ArrayLength<T>,
|
||||
T: fmt::Debug,
|
||||
U: sealed::Uxx,
|
||||
C: sealed::XCore,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list().entries(self.iter()).finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a, T, N, U, C> IntoIterator for &'a Queue<T, N, U, C>
|
||||
where
|
||||
N: ArrayLength<T>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user