Skip to content

Commit

Permalink
WithPosition: implement Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet authored and jswrenn committed Jan 23, 2024
1 parent 9958f40 commit a48c5b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/with_position.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::fmt;
use std::iter::{Fuse, FusedIterator, Peekable};

/// An iterator adaptor that wraps each element in an [`Position`].
Expand All @@ -14,6 +15,14 @@ where
peekable: Peekable<Fuse<I>>,
}

impl<I> fmt::Debug for WithPosition<I>
where
I: Iterator,
Peekable<Fuse<I>>: fmt::Debug,
{
debug_fmt_fields!(WithPosition, handled_first, peekable);
}

impl<I> Clone for WithPosition<I>
where
I: Clone + Iterator,
Expand Down

0 comments on commit a48c5b4

Please sign in to comment.