diff options
author | Gokul Soumya | 2022-12-25 05:54:09 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-01-18 05:19:32 +0000 |
commit | 5c7db7aed54f52b3af6102517f81c9d70bb6d1fb (patch) | |
tree | a49faaa0ceb633c09b908bfe249d2f9b4a935680 /helix-tui/src/widgets/table.rs | |
parent | b2837ff3bea286ce7ccfba9b6fbcd861977caf83 (diff) |
Replace menu::Item::{row, label} with format()
Diffstat (limited to 'helix-tui/src/widgets/table.rs')
-rw-r--r-- | helix-tui/src/widgets/table.rs | 6 |
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: |