Skip to content

Commit

Permalink
WithPosition: implement Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe-Cholet committed Jan 23, 2024
1 parent 62d2b65 commit e179b75
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 e179b75

Please sign in to comment.