From 5c7db7aed54f52b3af6102517f81c9d70bb6d1fb Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Sun, 25 Dec 2022 11:24:09 +0530 Subject: Replace menu::Item::{row, label} with format() --- helix-tui/src/widgets/table.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'helix-tui/src') 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>> From 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: -- cgit v1.2.3-70-g09d2