diff --git a/src/ui/widget.rs b/src/ui/widget.rs index 7d71bf7c..b5e76b83 100644 --- a/src/ui/widget.rs +++ b/src/ui/widget.rs @@ -193,7 +193,7 @@ where use ratatui::widgets::Table; let props = props - .and_then(|props| ShortcutsProps::from_boxed_any(props)) + .and_then(ShortcutsProps::from_boxed_any) .unwrap_or(self.props.clone()); let mut shortcuts = props.shortcuts.iter().peekable(); @@ -471,7 +471,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: Option>) { let props = props - .and_then(|props| TableProps::<'_, R>::from_boxed_any(props)) + .and_then(TableProps::<'_, R>::from_boxed_any) .unwrap_or(self.props.clone()); let widths: Vec = self diff --git a/src/ui/widget/container.rs b/src/ui/widget/container.rs index 21305c10..39ea2f16 100644 --- a/src/ui/widget/container.rs +++ b/src/ui/widget/container.rs @@ -121,7 +121,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: Option>) { let props = props - .and_then(|props| HeaderProps::from_boxed_any(props)) + .and_then(HeaderProps::from_boxed_any) .unwrap_or(self.props.clone()); let widths: Vec = props @@ -309,7 +309,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: Option>) { let props = props - .and_then(|props| FooterProps::from_boxed_any(props)) + .and_then(FooterProps::from_boxed_any) .unwrap_or(self.props.clone()); let widths = props @@ -465,7 +465,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: Option>) { let props = props - .and_then(|props| ContainerProps::from_boxed_any(props)) + .and_then(ContainerProps::from_boxed_any) .unwrap_or(self.props.clone()); let header_h = if self.header.is_some() { 3 } else { 0 }; diff --git a/src/ui/widget/input.rs b/src/ui/widget/input.rs index 4d10325c..8430ee3d 100644 --- a/src/ui/widget/input.rs +++ b/src/ui/widget/input.rs @@ -200,7 +200,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: Option>) { let props = props - .and_then(|props| TextFieldProps::from_boxed_any(props)) + .and_then(TextFieldProps::from_boxed_any) .unwrap_or(self.props.clone()); let layout = Layout::vertical(Constraint::from_lengths([1, 1])).split(area); diff --git a/src/ui/widget/text.rs b/src/ui/widget/text.rs index ac0d170f..c7bb92de 100644 --- a/src/ui/widget/text.rs +++ b/src/ui/widget/text.rs @@ -218,7 +218,7 @@ where { fn render(&self, frame: &mut ratatui::Frame, area: Rect, props: Option>) { let props = props - .and_then(|props| ParagraphProps::from_boxed_any(props)) + .and_then(ParagraphProps::from_boxed_any) .unwrap_or(self.props.clone()); let [content_area] = Layout::horizontal([Constraint::Min(1)])