|
|
@ -207,7 +207,7 @@ pub trait AnyComponent {
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// ```rust
|
|
|
|
/// ```rust
|
|
|
|
/// use helix_term::{ui::Text, compositor::Component};
|
|
|
|
/// use helix_term::{ui::Text, compositor::Component};
|
|
|
|
/// let boxed: Box<Component> = Box::new(Text::new("text".to_string()));
|
|
|
|
/// let boxed: Box<dyn Component> = Box::new(Text::new("text".to_string()));
|
|
|
|
/// let text: Box<Text> = boxed.as_boxed_any().downcast().unwrap();
|
|
|
|
/// let text: Box<Text> = boxed.as_boxed_any().downcast().unwrap();
|
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
|
|
|
|
fn as_boxed_any(self: Box<Self>) -> Box<dyn Any>;
|
|
|
|