aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'helix-tui/src/widgets')
-rw-r--r--helix-tui/src/widgets/table.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/helix-tui/src/widgets/table.rs b/helix-tui/src/widgets/table.rs
index 2983072d..400f65e0 100644
--- a/helix-tui/src/widgets/table.rs
+++ b/helix-tui/src/widgets/table.rs
@@ -127,6 +127,12 @@ impl<'a> Row<'a> {
}
}
+impl<'a, T: Into<Cell<'a>>> From<T> for Row<'a> {
+ fn from(cell: T) -> Self {
+ Row::new(vec![cell.into()])
+ }
+}
+
/// A widget to display data in formatted columns.
///
/// It is a collection of [`Row`]s, themselves composed of [`Cell`]s: