From 7a1c22be5efc6be366496d1cfce7ebac2386f02f Mon Sep 17 00:00:00 2001 From: Philippe-Cholet <44676486+Philippe-Cholet@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:34:47 +0100 Subject: [PATCH] `FlattenOk`: Debug with macro --- src/flatten_ok.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/flatten_ok.rs b/src/flatten_ok.rs index 21ae1f722..853122295 100644 --- a/src/flatten_ok.rs +++ b/src/flatten_ok.rs @@ -147,13 +147,7 @@ where T: IntoIterator, T::IntoIter: fmt::Debug, { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - f.debug_struct("FlattenOk") - .field("iter", &self.iter) - .field("inner_front", &self.inner_front) - .field("inner_back", &self.inner_back) - .finish() - } + debug_fmt_fields!(FlattenOk, iter, inner_front, inner_back); } /// Only the iterator being flattened needs to implement [`FusedIterator`].