From 05bc8b76e05fc8dd0fbd425987c5597dab8a860c Mon Sep 17 00:00:00 2001 From: Markus Westerlind Date: Thu, 9 Dec 2021 16:51:19 +0100 Subject: [PATCH] feat: Implement Debug on DocBuilder --- src/lib.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 818c6ee..6ddc889 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -660,6 +660,17 @@ pub struct DocBuilder<'a, D, A = ()>(pub &'a D, pub BuildDoc<'a, D::Doc, A>) where D: ?Sized + DocAllocator<'a, A>; +impl<'a, D, A> fmt::Debug for DocBuilder<'a, D, A> +where + D: ?Sized + DocAllocator<'a, A>, + D::Doc: fmt::Debug, + A: fmt::Debug, +{ + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + self.1.fmt(f) + } +} + impl<'a, A, D> Clone for DocBuilder<'a, D, A> where A: Clone,