prettytable-rs
prettytable-rs copied to clipboard
table-in-table style loss
#[macro_use] extern crate prettytable;
use prettytable::Table;
fn main() {
let in_table = table!([
Frbc->"Red",
Fgbc->"Green",
Fbbc->"Blue"
]);
let mut table = Table::new();
table.add_row(row![Frbc=> "Red", "Red", "Red", "Red"]);
table.add_row(row![in_table]);
in_table.printstd();
table.printstd();
}
When in_table is added as a row in table. It loses its styles.
On a related note. An option to automatically inherit the format of the outer table would be great.
In that case, in_table is converted into a string when inserted into table. Consequently, in_table looses all style attributes previoulsy added to it.