diff --git a/src/ui/widget/container.rs b/src/ui/widget/container.rs index 908736b0..e297cfd7 100644 --- a/src/ui/widget/container.rs +++ b/src/ui/widget/container.rs @@ -101,7 +101,7 @@ impl<'a: 'static, S, A> View for Header<'a, S, A> { fn update(&mut self, state: &S) { if let Some(on_update) = self.on_update { - if let Some(props) = (on_update)(state).downcast_ref::>() { + if let Some(props) = (on_update)(state).downcast_ref::() { self.props = props.clone(); } } @@ -264,7 +264,7 @@ impl<'a: 'static, S, A> View for Footer<'a, S, A> { fn update(&mut self, state: &S) { if let Some(on_update) = self.on_update { - if let Some(props) = (on_update)(state).downcast_ref::>() { + if let Some(props) = (on_update)(state).downcast_ref::() { self.props = props.clone(); } } @@ -306,9 +306,7 @@ where B: Backend, { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: &dyn Any) { - let props = props - .downcast_ref::>() - .unwrap_or(&self.props); + let props = props.downcast_ref::().unwrap_or(&self.props); let widths = props .columns diff --git a/src/ui/widget/text.rs b/src/ui/widget/text.rs index 1ba5b104..a97be9f4 100644 --- a/src/ui/widget/text.rs +++ b/src/ui/widget/text.rs @@ -167,7 +167,7 @@ impl<'a: 'static, S, A> View for Paragraph<'a, S, A> { fn update(&mut self, state: &S) { if let Some(on_update) = self.on_update { - if let Some(props) = (on_update)(state).downcast_ref::>() { + if let Some(props) = (on_update)(state).downcast_ref::() { self.props = props.clone(); } } @@ -211,7 +211,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: &dyn Any) { let props = props - .downcast_ref::>() + .downcast_ref::() .unwrap_or(&self.props); let block = Block::default()