From e94003a2993923601cac5c1ba0b6988e13a6af39 Mon Sep 17 00:00:00 2001 From: jack-cooper Date: Sat, 24 Dec 2022 16:02:10 +0000 Subject: [PATCH] Removed Debug impls to de-clutter example --- src/lib.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3a06600..83149ac 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -206,11 +206,8 @@ //! //! //! ``` -//! use std::fmt; -//! //! use once_cell::sync::OnceCell; //! -//! #[derive(Debug)] //! pub struct LateInit { cell: OnceCell } //! //! impl LateInit { @@ -240,24 +237,14 @@ //! a: LateInit<&'a A<'a>> //! } //! -//! impl fmt::Debug for A<'_> { -//! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -//! write!(f, "A") -//! } -//! } -//! -//! impl fmt::Debug for B<'_> { -//! fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -//! write!(f, "B") -//! } -//! } //! //! fn build_cycle() { //! let a = A::default(); //! let b = B::default(); //! a.b.init(&b); //! b.a.init(&a); -//! println!("{:?}", a.b.a.b.a); +//! +//! let _a = &a.b.a.b.a; //! } //! ``` //!