diff --git a/src/common.rs b/src/common.rs index 833795dcff0ac6c1f792559c21309d069bcf224e..3112933de493280ae1d39235bbbcb743cfbd8341 100644 --- a/src/common.rs +++ b/src/common.rs @@ -100,8 +100,8 @@ pub(crate) enum SyncBlocker { PutMsg(PortId, Payload), NondetChoice { n: u16 }, } -pub(crate) struct DenseDebugHex<'a>(pub &'a [u8]); - +struct DenseDebugHex<'a>(pub &'a [u8]); +struct DebuggableIter + Clone, T: Debug>(pub(crate) I); ///////////////////// IMPL ///////////////////// impl IdParts for Id { fn id_parts(self) -> (ConnectorId, U32Suffix) { @@ -236,3 +236,9 @@ impl Debug for DenseDebugHex<'_> { Ok(()) } } + +impl + Clone, T: Debug> Debug for DebuggableIter { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { + f.debug_list().entries(self.0.clone()).finish() + } +}