Skip to content

Commit 7a1c22b

Browse files
Philippe-Choletjswrenn
authored andcommitted
FlattenOk: Debug with macro
1 parent 94452e3 commit 7a1c22b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/flatten_ok.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,7 @@ where
147147
T: IntoIterator,
148148
T::IntoIter: fmt::Debug,
149149
{
150-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
151-
f.debug_struct("FlattenOk")
152-
.field("iter", &self.iter)
153-
.field("inner_front", &self.inner_front)
154-
.field("inner_back", &self.inner_back)
155-
.finish()
156-
}
150+
debug_fmt_fields!(FlattenOk, iter, inner_front, inner_back);
157151
}
158152

159153
/// Only the iterator being flattened needs to implement [`FusedIterator`].

0 commit comments

Comments
 (0)