mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-26 22:50:47 +00:00
36d8c53645
This allows passing an array, slice or Vec of constraints, which is more ergonomic than requiring this to always be a slice. The following calls now all succeed: ```rust Table::new(rows).widths([Constraint::Length(5), Constraint::Length(5)]); Table::new(rows).widths(&[Constraint::Length(5), Constraint::Length(5)]); // widths could also be computed at runtime let widths = vec![Constraint::Length(5), Constraint::Length(5)]; Table::new(rows).widths(widths.clone()); Table::new(rows).widths(&widths); ``` |
||
---|---|---|
.. | ||
backend_termion.rs | ||
border_macro.rs | ||
stylize.rs | ||
terminal.rs | ||
widgets_barchart.rs | ||
widgets_block.rs | ||
widgets_calendar.rs | ||
widgets_canvas.rs | ||
widgets_chart.rs | ||
widgets_gauge.rs | ||
widgets_list.rs | ||
widgets_paragraph.rs | ||
widgets_table.rs | ||
widgets_tabs.rs |