aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src/widgets/table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-tui/src/widgets/table.rs')
-rw-r--r--helix-tui/src/widgets/table.rs11
1 files changed, 1 insertions, 10 deletions
diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs
index d7caa0b0..6aee5988 100644
--- a/helix-tui/src/widgets/table.rs
+++ b/helix-tui/src/widgets/table.rs
@@ -363,21 +363,12 @@ impl<'a> Table<'a> {
}
}
-#[derive(Debug, Clone)]
+#[derive(Debug, Default, Clone)]
pub struct TableState {
pub offset: usize,
pub selected: Option<usize>,
}
-impl Default for TableState {
- fn default() -> TableState {
- TableState {
- offset: 0,
- selected: None,
- }
- }
-}
-
impl TableState {
pub fn selected(&self) -> Option<usize> {
self.selected