diff --git a/src/lib.rs b/src/lib.rs index 9fa6767..ee5636d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,11 +38,6 @@ use std::fmt::{self, Debug, Display, Formatter}; use std::num::NonZeroUsize; -/// Implement serde::Serialize and serde::Deserialize traits for Tree -/// -/// # Warning -/// Serialize and Deserialize implementations are recursive. They require an amount of stack memory -/// proportional to the tree depth. #[cfg(feature = "serde")] pub mod serde; diff --git a/src/serde.rs b/src/serde.rs index 08338e9..f70cd82 100644 --- a/src/serde.rs +++ b/src/serde.rs @@ -1,3 +1,9 @@ +//! Implement `serde::Serialize` and `serde::Deserialize` traits for Tree +//! +//! # Warning +//! Serialize and Deserialize implementations are recursive. They require an amount of stack memory +//! proportional to the depth of the tree. + use std::{fmt, marker::PhantomData}; use serde::{