diff --git a/helix-term/src/compositor.rs b/helix-term/src/compositor.rs index cd0a12b5..c00b95e9 100644 --- a/helix-term/src/compositor.rs +++ b/helix-term/src/compositor.rs @@ -180,13 +180,14 @@ pub trait AnyComponent { /// Returns a boxed any from a boxed self. /// /// Can be used before `Box::downcast()`. - // - // # Examples - // - // ```rust - // let boxed: Box = Box::new(TextComponent::new("text")); - // let text: Box = boxed.as_boxed_any().downcast().unwrap(); - // ``` + /// + /// # Examples + /// + /// ```rust + /// use helix_term::{ui::Text, compositor::Component}; + /// let boxed: Box = Box::new(Text::new("text".to_string())); + /// let text: Box = boxed.as_boxed_any().downcast().unwrap(); + /// ``` fn as_boxed_any(self: Box) -> Box; }