Skip to content

Commit

Permalink
feat: Implement Debug on DocBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Dec 9, 2021
1 parent 9193134 commit 05bc8b7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 05bc8b7

Please sign in to comment.