bin: Use BoxedAny trait

This commit is contained in:
Erik Kundt
2024-05-13 13:24:40 +02:00
parent 7bcf2bc7a8
commit f5102451ea
3 changed files with 10 additions and 3 deletions
+4 -1
View File
@@ -23,7 +23,7 @@ use tui::ui::widget::input::{TextField, TextFieldProps, TextFieldState};
use tui::ui::widget::list::{Table, TableProps, TableUtils};
use tui::ui::widget::text::{Paragraph, ParagraphProps, ParagraphState};
use tui::ui::widget::window::{Shortcuts, ShortcutsProps};
use tui::ui::widget::{BaseView, Properties, RenderProps, Widget, WidgetState};
use tui::ui::widget::{BaseView, BoxedAny, Properties, RenderProps, Widget};
use tui::Selection;
@@ -110,6 +110,7 @@ impl<'a> From<&State> for BrowserProps<'a> {
}
impl<'a> Properties for BrowserProps<'a> {}
impl<'a> BoxedAny for BrowserProps<'a> {}
pub struct Browser<'a> {
/// Internal base
@@ -301,6 +302,7 @@ impl<'a> From<&State> for BrowserPageProps<'a> {
}
impl<'a> Properties for BrowserPageProps<'a> {}
impl<'a> BoxedAny for BrowserPageProps<'a> {}
pub struct BrowserPage<'a> {
/// Internal base
@@ -497,6 +499,7 @@ impl<'a> From<&State> for HelpPageProps<'a> {
}
impl<'a> Properties for HelpPageProps<'a> {}
impl<'a> BoxedAny for HelpPageProps<'a> {}
pub struct HelpPage<'a> {
/// Internal base
+3 -1
View File
@@ -24,7 +24,7 @@ use tui::ui::widget::input::{TextField, TextFieldProps, TextFieldState};
use tui::ui::widget::list::{Table, TableProps, TableUtils};
use tui::ui::widget::text::{Paragraph, ParagraphProps, ParagraphState};
use tui::ui::widget::window::{Shortcuts, ShortcutsProps};
use tui::ui::widget::{BaseView, Properties, RenderProps, Widget, WidgetState};
use tui::ui::widget::{BaseView, BoxedAny, Properties, RenderProps, Widget};
use tui::Selection;
@@ -116,6 +116,7 @@ impl<'a> From<&State> for BrowsePageProps<'a> {
}
impl<'a> Properties for BrowsePageProps<'a> {}
impl<'a> BoxedAny for BrowsePageProps<'a> {}
pub struct BrowsePage<'a> {
/// Internal base
@@ -401,6 +402,7 @@ impl<'a> From<&State> for HelpPageProps<'a> {
}
impl<'a> Properties for HelpPageProps<'a> {}
impl<'a> BoxedAny for HelpPageProps<'a> {}
pub struct HelpPage<'a> {
/// Internal base
+3 -1
View File
@@ -25,7 +25,7 @@ use tui::ui::widget::input::{TextField, TextFieldProps, TextFieldState};
use tui::ui::widget::list::{Table, TableProps, TableUtils};
use tui::ui::widget::text::{Paragraph, ParagraphProps, ParagraphState};
use tui::ui::widget::window::{Shortcuts, ShortcutsProps};
use tui::ui::widget::{BaseView, Properties, RenderProps, Widget, WidgetState};
use tui::ui::widget::{BaseView, BoxedAny, Properties, RenderProps, Widget};
use tui::Selection;
@@ -116,6 +116,7 @@ impl<'a> From<&State> for BrowsePageProps<'a> {
}
impl<'a: 'static> Properties for BrowsePageProps<'a> {}
impl<'a: 'static> BoxedAny for BrowsePageProps<'a> {}
pub struct BrowsePage<'a> {
/// Internal base
@@ -418,6 +419,7 @@ impl<'a> From<&State> for HelpPageProps<'a> {
}
impl<'a> Properties for HelpPageProps<'a> {}
impl<'a> BoxedAny for HelpPageProps<'a> {}
pub struct HelpPage<'a> {
/// Internal base