diff --git a/gstreamer/src/iterator.rs b/gstreamer/src/iterator.rs index 9879db75f..2bdb750b1 100644 --- a/gstreamer/src/iterator.rs +++ b/gstreamer/src/iterator.rs @@ -48,7 +48,6 @@ impl Error for IteratorError { } // Implemented manually so that we can use generics for the item -#[derive(Debug)] pub struct Iterator { iter: ptr::NonNull, borrowed: bool, @@ -468,6 +467,15 @@ impl Clone for Iterator { } } +impl fmt::Debug for Iterator { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_struct("Iterator") + .field("iter", &self.iter) + .field("borrowed", &self.borrowed) + .finish() + } +} + impl Drop for Iterator { fn drop(&mut self) { if !self.borrowed {