fix description in traits.rs (#731)
* fix description in traits.rs * add file comment for partial example
Delta semántico
Ninguna definición cambió: el cambio es de texto, documentación o datos.
2 archivos · +8 −1
diff --git a/examples/custom_tree_owned_partial.rs b/examples/custom_tree_owned_partial.rs
index da77f3318..9aca52cd4 100644
--- a/examples/custom_tree_owned_partial.rs
+++ b/examples/custom_tree_owned_partial.rs
@@ -1,3 +1,10 @@
+//! ## Example: Partial Tree with Directly Owned Children
+//!
+//! The following example demonstrate an implementation of Taffy's Partial trait and usage of the low-level compute APIs.
+//! This example uses directly owned children with NodeId's being index's into vec on parent node.
+//! Since an iterator created from a node can't access grandchildren, we are limited to only implement `TraversePartialTree`.
+//! See the [`crate::tree::traits`] module for more details about the low-level traits.
+
mod common {
pub mod image;
pub mod text;
diff --git a/src/tree/traits.rs b/src/tree/traits.rs
index 07fd6477a..2642b0749 100644
--- a/src/tree/traits.rs
+++ b/src/tree/traits.rs
@@ -5,7 +5,7 @@
//! The following examples demonstrate end-to-end implementation of Taffy's traits and usage of the low-level compute APIs:
//!
//! - [custom_tree_vec](https://github.com/DioxusLabs/taffy/blob/main/examples/custom_tree_vec.rs) which implements a custom Taffy tree using a `Vec` as an arena with NodeId's being index's into the Vec.
-//! - [custom_tree_owned_partial](https://github.com/DioxusLabs/taffy/blob/main/examples/custom_tree_owned_partial.rs) which implements a custom Taffy tree using directly owned children with NodeId's being pointers.
+//! - [custom_tree_owned_partial](https://github.com/DioxusLabs/taffy/blob/main/examples/custom_tree_owned_partial.rs) which implements a custom Taffy tree using directly owned children with NodeId's being index's into vec on parent node.
//! - [custom_tree_owned_unsafe](https://github.com/DioxusLabs/taffy/blob/main/examples/custom_tree_owned_unsafe.rs) which implements a custom Taffy tree using directly owned children with NodeId's being pointers.
//!
//! ## Overview