From e179b75aa6de465b612886bd03276cf332536a99 Mon Sep 17 00:00:00 2001 From: Philippe-Cholet <44676486+Philippe-Cholet@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:25:48 +0100 Subject: [PATCH] `WithPosition`: implement Debug --- src/with_position.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/with_position.rs b/src/with_position.rs index 89cddeb8a..2d56bb9b2 100644 --- a/src/with_position.rs +++ b/src/with_position.rs @@ -1,3 +1,4 @@ +use std::fmt; use std::iter::{Fuse, FusedIterator, Peekable}; /// An iterator adaptor that wraps each element in an [`Position`]. @@ -14,6 +15,14 @@ where peekable: Peekable>, } +impl fmt::Debug for WithPosition +where + I: Iterator, + Peekable>: fmt::Debug, +{ + debug_fmt_fields!(WithPosition, handled_first, peekable); +} + impl Clone for WithPosition where I: Clone + Iterator,